diff options
author | Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> | 2020-01-18 20:17:43 +0300 |
---|---|---|
committer | Michael Schuster <michael@schuster.ms> | 2020-01-19 16:14:23 +0300 |
commit | d3cd422b46bed0445ab9b4662a56a829814a61bd (patch) | |
tree | b839217a3045fd94d283eacb5dcf42952b0b97ff /src/gui/owncloudgui.cpp | |
parent | 482ab9ad149f2a1a5f83da75a468c4cefc2bb25c (diff) |
Fix crash on start without any accounts
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 9935606c87ec4818f04c7d7c63d2f4b61187eead)
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r-- | src/gui/owncloudgui.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index f4f37ba1a..d271059ab 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -166,7 +166,12 @@ void ownCloudGui::slotTrayClicked(QSystemTrayIcon::ActivationReason reason) } else if (_tray->isOpen()) { _tray->hideWindow(); } else { - _tray->showWindow(); + if (AccountManager::instance()->accounts().isEmpty()) { + this->slotOpenSettingsDialog(); + } else { + _tray->showWindow(); + } + } } // FIXME: Also make sure that any auto updater dialogue https://github.com/owncloud/client/issues/5613 |