All pastes #1000197 Raw Edit

Miscellany

public text v1 · immutable
#1000197 ·published 2008-04-28 10:03 UTC
rendered paste body
Index: windowtaskitem.cpp
===================================================================
--- windowtaskitem.cpp	(revision 800606)
+++ windowtaskitem.cpp	(working copy)
@@ -207,6 +207,10 @@ void WindowTaskItem::setGeometry(const Q
 void WindowTaskItem::publishIconGeometry()
 {
     QGraphicsView *parentView = 0L;
+    // It's assumed that we won't be visible on more than one view here.
+    if (!scene()) {
+        return;
+    }
     // The following was taken from Plasma::Applet, it doesn't make sense to make the item an applet, and this was the easiest way around it.
     foreach (QGraphicsView *view, scene()->views()) {
         if (view->sceneRect().intersects(sceneBoundingRect()) ||