[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Fri May 12 09:29:58 CEST 2006


SVN commit 539963 by staikos:

We've been through this one before.  Revert #539423 for this file.  The back
buffer is not supposed to ever be null.  If it's null, there is a bug and we
need to fix it.  It can and will crash other ways, or produce invalid output.




 M  +8 -10     kstviewlegend.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewlegend.cpp #539962:539963
@@ -210,16 +210,14 @@
   setDirty(false);
 
   _backBuffer.buffer().resize(contentsRect().size());
-  if (!_backBuffer.buffer().isNull()) {
-    _backBuffer.buffer().fill(backgroundColor());
-    KstPainter p;
-    p.begin(&_backBuffer.buffer());
-    QPen pen;
-    pen.setColor(foregroundColor());
-    p.setPen(pen);
-    drawToPainter(p);
-    p.end();
-  }
+  _backBuffer.buffer().fill(backgroundColor());
+  KstPainter p;
+  p.begin(&_backBuffer.buffer());
+  QPen pen;
+  pen.setColor(foregroundColor());
+  p.setPen(pen);
+  drawToPainter(p);
+  p.end();
 }
 
 


More information about the Kst mailing list