Make sure the settings dialog exist before hiding it
authorKevin Ottens <kevin.ottens@nextcloud.com>
Mon, 9 Nov 2020 11:02:15 +0000 (12:02 +0100)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 10 Nov 2020 16:57:56 +0000 (16:57 +0000)
Because of PR #2580 the settings dialog doesn't always exist. We need to
check for it first before placing calls to it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/owncloudgui.cpp

index 9b8c42a7b82a70f9b419fe5617a8e00996964989..3f1cee09cdd7efd55b07b7e43d657e1eb9708055 100644 (file)
@@ -658,7 +658,9 @@ void ownCloudGui::slotShowShareDialog(const QString &sharePath, const QString &l
     }
 
     // For https://github.com/owncloud/client/issues/3783
-    _settingsDialog->hide();
+    if (_settingsDialog) {
+        _settingsDialog->hide();
+    }
 
     const auto accountState = folder->accountState();