[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Sep 13 19:57:04 CEST 2005


SVN commit 460394 by staikos:

let's find out how this happens


 M  +5 -2      kstviewpicture.cpp  


--- trunk/extragear/graphics/kst/kst/kstviewpicture.cpp #460393:460394
@@ -16,9 +16,10 @@
  ***************************************************************************/
 
 #include "kstviewpicture.h"
-
 #include "kst.h"
 
+#include <assert.h>
+
 #include <kglobal.h>
 #include <kio/netaccess.h>
 
@@ -77,8 +78,10 @@
     p.drawLine(geometry().topRight(), geometry().bottomLeft());
   } else {
     QRect cr = contentsRect();
+    assert(!cr.isNull()); // Null view objects are not allowed.  I want to see
+                          // how this happens so it can be fixed.
     
-    if (cr.size().width() > 0 && cr.size().height() > 0 ) {
+    if (!cr.isNull()) {
       if (_iCache.isNull() || _iCache.size() != cr.size()) {
         _iCache = _image.copy();
         if (!_iCache.isNull()) {


More information about the Kst mailing list