From 7b31217f5f586ca88e794f61ff19a6ae47fbfee7 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 13 Nov 2010 21:50:46 +0000 Subject: [PATCH] Temporary fix for crash that happens in Konsole Part when user has opened the popup menu and then closes the last session. The down side is now no popup menu is displayed. CCBUG: 246652 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1196676 --- src/SessionController.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 5a977a37c..4cb994844 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -1053,6 +1053,16 @@ void SessionController::sessionTitleChanged() void SessionController::showDisplayContextMenu(const QPoint& position) { + /* After showing this menu in a Konsole Part, it will crash upon + * exiting the last session. + BUG 246652 + */ + if (!factory()) + { + kWarning()<< "Not showing menu to avoid crash (BUG 246652)"; + return; + } + // needed to make sure the popup menu is available, even if a hosting // application did not merge our GUI. if (!factory())