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

List:       kde-commits
Subject:    KDE/kdebase/runtime/plasma/kpart
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2011-01-16 19:17:00
Message-ID: 20110116191700.60F0C3E1F1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214882 by aseigo:

* can't call first on an empty list, so be careful with that
* clean ups


 M  +5 -1      plasmakpartcorona.cpp  
 U             plasmakpartcorona.h  


--- trunk/KDE/kdebase/runtime/plasma/kpart/plasmakpartcorona.cpp #1214881:1214882
@@ -87,9 +87,13 @@
 
 Plasma::Containment* PlasmaKPartCorona::containment()
 {
+    // We only have one containment, so just try and return the first one
     QList<Plasma::Containment*> list = containments();
+    if (!list.isEmpty()) {
+        return list.first();
+    }
 
-    return list.first(); // We only have one containment
+    return 0;
 }
 
 #include "plasmakpartcorona.moc"
[prev in list] [next in list] [prev in thread] [next in thread] 

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