summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2019-04-05 12:45:08 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2019-04-05 12:02:53 +0000
commit844d7582dc73ec0ec11f939cc1cf9e4abb4786e8 (patch)
tree63d58698517feec6d6d9f4e2a177912249e2108d
parent1b006ab3d8954efcaa76a1768b31df01e133f34d (diff)
Fix a crash when closing the Manage Bookmarks dialog
Before, we have deleted the bookmarks dialog directly from it's closeEvent. It means that its closeEvent invocation wasn't finished yet -> crash. We use deleteLater now instead. Task-number: QTBUG-72218 Change-Id: Ia83f9d2027a63ccaccebe22a8e5d92e808bec2bd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r--src/assistant/assistant/bookmarkmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/assistant/assistant/bookmarkmanager.cpp b/src/assistant/assistant/bookmarkmanager.cpp
index f15e23a6e..331cea864 100644
--- a/src/assistant/assistant/bookmarkmanager.cpp
+++ b/src/assistant/assistant/bookmarkmanager.cpp
@@ -526,7 +526,8 @@ void BookmarkManager::focusInEventOccurred()
void BookmarkManager::managerWidgetAboutToClose()
{
- delete bookmarkManagerWidget;
+ if (bookmarkManagerWidget)
+ bookmarkManagerWidget->deleteLater();
bookmarkManagerWidget = nullptr;
storeBookmarks();