mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Fix crash when the account config is gone and there are still folder
In rare case (due to a bug in QSettings) the account config may disapear We should not crash in that case
This commit is contained in:
parent
3f724e1c6a
commit
f9263da3de
1 changed files with 8 additions and 0 deletions
|
@ -91,6 +91,14 @@ Folder::Folder(const QString &alias, const QString &path, const QString& secondP
|
|||
|
||||
bool Folder::init()
|
||||
{
|
||||
Account *account = AccountManager::instance()->account();
|
||||
if (!account) {
|
||||
// Normaly this should not happen, but it could be that there is something
|
||||
// wrong with the config and it is better not to crash.
|
||||
qWarning() << "WRN: No account configured, can't sync";
|
||||
return false;
|
||||
}
|
||||
|
||||
QString url = Utility::toCSyncScheme(remoteUrl().toString());
|
||||
QString localpath = path();
|
||||
|
||||
|
|
Loading…
Reference in a new issue