Do not run into an endless loop in case we have no containment

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741866
This commit is contained in:
Sebastian Trueg 2007-11-26 16:25:12 +00:00
parent 09f337b3fa
commit 05ae38296c

View File

@ -1205,7 +1205,7 @@ void Applet::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Applet* containment = dynamic_cast<Plasma::Applet*>(topLevelItem());
if (!containment) {
if (!containment || containment == this) {
//kDebug() << "no containment. hm.";
Widget::contextMenuEvent(event);
return;