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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/containments/panel
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2009-02-23 19:18:03
Message-ID: 1235416683.880816.12679.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 930535 by sebsauer:

* fix plasma workspace crashs when changing theme
* check return-value of the dyn cast

BUG:185242


 M  +8 -0      panel.cpp  


--- trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.cpp #930534:930535
@@ -223,6 +223,10 @@
 void Panel::appletRemoved(Plasma::Applet* applet)
 {
     QGraphicsLinearLayout *lay = dynamic_cast<QGraphicsLinearLayout*>(layout());
+    if (!lay) {
+        return;
+    }
+
     lay->removeItem(applet);
 
     //shrink the panel if possible
@@ -505,6 +509,10 @@
 
 void Panel::themeUpdated()
 {
+    if (!layout()) {
+        return;
+    }
+
     //if the theme is changed all the calculations needs to be done again
     //and resize based on the change in the theme bordersize
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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