Set trans_popup to 0 when creating the popup menu and compositing is off.

This prevents trans_popup from becoming dangling pointer and fixes crash when reopening
  popup menu after turning off compositing.

svn path=/trunk/KDE/kdebase/workspace/; revision=731306
This commit is contained in:
Rivo Laks 2007-10-31 09:42:09 +00:00
parent 9f465a85ae
commit 99e2ed7fa8

View file

@ -109,6 +109,7 @@ QMenu* Workspace::clientPopup()
action = popup->addMenu( advanced_popup );
action->setText( i18n("Ad&vanced") );
trans_popup = 0;
if (compositing()){
trans_popup = new QMenu( popup );
trans_popup->setFont(KGlobalSettings::menuFont());