Summary: | Crash when resizing plot with legend | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | kst |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrew Walker
2006-08-02 00:04:23 UTC
SVN commit 568678 by arwalker: BUG:131693 Don't try to paint to an empty bitmap as it causes a crash. M +10 -8 kstviewlegend.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstviewlegend.cpp #568677:568678 @@ -219,14 +219,16 @@ setDirty(false); _backBuffer.buffer().resize(contentsRect().size()); - _backBuffer.buffer().fill(backgroundColor()); - KstPainter p; - p.begin(&_backBuffer.buffer()); - QPen pen; - pen.setColor(foregroundColor()); - p.setPen(pen); - drawToPainter(p); - p.end(); + if (!contentsRect().size().isEmpty()) { + _backBuffer.buffer().fill(backgroundColor()); + KstPainter p; + p.begin(&_backBuffer.buffer()); + QPen pen; + pen.setColor(foregroundColor()); + p.setPen(pen); + drawToPainter(p); + p.end(); + } } Fix was reverted Can't reproduce with trunk. |