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
This commit is contained in:
Kurt Hindenburg
2010-11-13 21:50:46 +00:00
parent 698a05b26d
commit 7b31217f5f

View File

@@ -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())