diff options
author | Ramamurthy KV <rammurthy_kv@rediffmail.com> | 2012-01-25 16:26:29 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-30 20:52:59 (GMT) |
commit | 59719558e174ee06d85f882d488e23dfb312cc33 (patch) | |
tree | 01631eebde444680ae34789af48d7056afd3e150 /src/plugins | |
parent | 4095205c7946002ade51c52c92d8951256ab99bf (diff) | |
download | Qt-59719558e174ee06d85f882d488e23dfb312cc33.zip Qt-59719558e174ee06d85f882d488e23dfb312cc33.tar.gz Qt-59719558e174ee06d85f882d488e23dfb312cc33.tar.bz2 |
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')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 91bda47..2af6f3d 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] |