summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qrasterizer.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-16 09:03:15 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-06-17 16:29:42 +0200
commite3736c5031b941a665952a9696d989d79b25f32f (patch)
tree9f710909aebda6565bd4b854c020646f9192c28d /src/gui/painting/qrasterizer.cpp
parentc57e8b1e92c369c2aa507ebfa6cfebe18a282635 (diff)
Fixed segmentation fault caused by empty clip.
Make sure not to use the broken QRect constructor, and do an early check on whether the clip rect is empty in QRasterizer::rasterizeLine(). Task-number: 254105 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qrasterizer.cpp')
-rw-r--r--src/gui/painting/qrasterizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 629b38ef0b..58e4b4e3c7 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -703,7 +703,7 @@ static inline qreal qRoundF(qreal v)
void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap)
{
- if (a == b || width == 0)
+ if (a == b || width == 0 || d->clipRect.isEmpty())
return;
QPointF pa = a;