[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Mar 16 00:17:52 CET 2005


CVS commit by arwalker: 

Prevent a crash that results when trying to draw into a null pixmap. This can happen when a plot takes up either zero width or zero height in a window.


  M +6 -7      kst2dplot.cpp   1.376


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.375:1.376
@@ -2136,4 +2136,5 @@ void Kst2DPlot::draw() {
 
   _buffer.buffer().resize(size());
+  if (!_buffer.buffer().isNull()) {
   _buffer.buffer().fill(backgroundColor());
   QPainter p(&_buffer.buffer());
@@ -2139,6 +2140,6 @@ void Kst2DPlot::draw() {
   QPainter p(&_buffer.buffer());
   p.setWindow(0, 0, geometry().width(), geometry().height());
-
   draw(p, P_PAINT);
+  }
 }
 




More information about the Kst mailing list