[Pkg-owncloud-commits] [owncloud-client] 288/498: owncloudGui: Fix crash when sign in

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 644486871bd5172d9a6a635cc84ec98e7d5be323
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Jul 9 12:15:06 2015 +0200

    owncloudGui: Fix crash when sign in
    
    The sign in action from within that menu might change the account state
    and call setupContextMenu. We must not delete the menu from there
    
    Issue #3427
---
 src/gui/owncloudgui.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index f4de43b..7f983c8 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -363,8 +363,8 @@ void ownCloudGui::setupContextMenu()
         _tray->setContextMenu(_contextMenu.data());
     }
     _contextMenu->setTitle(Theme::instance()->appNameGUI() );
-
-    qDeleteAll(_accountMenus);
+    // We must call deleteLater because we might be called from the press in one of the action.
+    foreach (auto menu, _accountMenus) { menu->deleteLater(); }
     _accountMenus.clear();
     if (accountList.count() > 1) {
         foreach (AccountStatePtr account, accountList) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list