When you try to open the local sync folder (by clicking on the
folder symbol) for an account that has no folder configured,
the client crashes.
This commit changes User::openLocalFolder() to do nothing in
case no local folder is configured.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
void User::openLocalFolder()
{
+ const auto folder = getFolder();
+
+ if (folder != nullptr) {
#ifdef Q_OS_WIN
- QString path = "file:///" + this->getFolder()->path();
+ QString path = "file:///" + folder->path();
#else
- QString path = "file://" + this->getFolder()->path();
+ QString path = "file://" + folder->path();
#endif
- QDesktopServices::openUrl(path);
+ QDesktopServices::openUrl(path);
+ }
}
void User::login() const