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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/lib
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2007-06-01 22:58:48
Message-ID: 1180738728.720150.7969.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 670543 by aseigo:

prevent crash when this gets called too early


 M  +9 -1      applet.cpp  


--- trunk/KDE/kdebase/workspace/plasma/lib/applet.cpp #670542:670543
@@ -137,16 +137,24 @@
 
 void Applet::constraintsUpdated()
 {
-    kDebug() << "constraints are FormFactor: " << formFactor() << ", Location: " << \
location() << endl; +    kDebug() << "Applet::constraintsUpdate(): constraints are \
FormFactor: " << formFactor() << ", Location: " << location() << endl;  }
 
 FormFactor Applet::formFactor() const
 {
+    if (!scene()) {
+        return Plasma::Planar;
+    }
+
     return static_cast<Corona*>(scene())->formFactor();
 }
 
 Location Applet::location() const
 {
+    if (!scene()) {
+        return Plasma::Desktop;
+    }
+
     return static_cast<Corona*>(scene())->location();
 }
 


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

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