summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb
diff options
context:
space:
mode:
authorRamamurthy KV <rammurthy_kv@rediffmail.com>2012-01-25 21:56:29 +0530
committerQt by Nokia <qt-info@nokia.com>2012-01-30 21:52:59 +0100
commit59719558e174ee06d85f882d488e23dfb312cc33 (patch)
tree01631eebde444680ae34789af48d7056afd3e150 /src/plugins/gfxdrivers/directfb
parent4095205c7946002ade51c52c92d8951256ab99bf (diff)
QDirectFBPaintEngine::fill crashes if QVectorPath elements is NULL
Checking for elements to not NULL. If the shape is QVectorPath::RectangleHint calling fillRect and not falling to RASTERCALLBACK. QTBUG #23850 Change-Id: I402da6074a1c7a9b1d026efe5d1b068e4aea8805 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 91bda478b9..2af6f3d82e 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -829,11 +829,13 @@ void QDirectFBPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
const qreal *points = path.points();
if (path.elementCount() == 5) {
- if (elements[0] == QPainterPath::MoveToElement
+ if ((elements
+ && elements[0] == QPainterPath::MoveToElement
&& elements[1] == QPainterPath::LineToElement
&& elements[2] == QPainterPath::LineToElement
&& elements[3] == QPainterPath::LineToElement
- && elements[4] == QPainterPath::LineToElement) {
+ && elements[4] == QPainterPath::LineToElement )
+ || (path.shape() == QVectorPath::RectangleHint)) {
if (points[1] == points[3]
&& points[2] == points[4]