[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/plasma
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2008-12-01 0:49:38
Message-ID: 1228092578.023075.7757.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 891032 by aseigo:

don't crash when given a null item pointer
BUG:176410


 M  +1 -1      plasma.cpp  
 M  +4 -4      tooltipmanager.cpp  


--- trunk/KDE/kdelibs/plasma/plasma.cpp #891031:891032
@@ -69,7 +69,7 @@
 
 QGraphicsView *viewFor(const QGraphicsItem *item)
 {
-    if (!item->scene()) {
+    if (!item || !item->scene()) {
         return 0;
     }
 
--- trunk/KDE/kdelibs/plasma/tooltipmanager.cpp #891031:891032
@@ -166,9 +166,9 @@
         return;
     }
 
+    d->currentWidget = 0;
     d->showTimer->stop();  // stop the timer to show the tooltip
     d->delayedHide = false;
-    d->currentWidget = 0;
     d->tipWidget->hide();
 }
 
@@ -255,10 +255,10 @@
     QGraphicsWidget *w = static_cast<QGraphicsWidget*>(object);
 
     if (currentWidget == w) {
+        currentWidget = 0;
+        showTimer->stop();  // stop the timer to show the tooltip
         tipWidget->setContent(0, ToolTipContent());
         tipWidget->hide();
-        currentWidget = 0;
-        showTimer->stop();  // stop the timer to show the tooltip
         delayedHide = false;
     }
 
@@ -277,8 +277,8 @@
             //One might have moused out and back in again
             delayedHide = false;
             isShown = false;
+            currentWidget = 0;
             tipWidget->hide();
-            currentWidget = 0;
         }
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic