diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-06-22 03:29:44 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-06-22 03:29:44 (GMT) |
commit | 70db717f8a6bbdb52ea22feacf2ced4fbea8fd1c (patch) | |
tree | e648c01b9179b2ac084c951264ca2faa90cd0691 /src/plugins | |
parent | 6f3622e9e72e0a01763043678cf022a7c6917ffc (diff) | |
download | Qt-70db717f8a6bbdb52ea22feacf2ced4fbea8fd1c.zip Qt-70db717f8a6bbdb52ea22feacf2ced4fbea8fd1c.tar.gz Qt-70db717f8a6bbdb52ea22feacf2ced4fbea8fd1c.tar.bz2 |
Bail out on invalid color in fillRect
Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index e8cccfd..176c6fa 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -686,8 +686,11 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) if (!d->unsupportedCompositionMode && d->dfbCanHandleClip(rect) && !d->matrixRotShear) { switch (brush.style()) { case Qt::SolidPattern: { + const QColor color = brush.color(); + if (!color.isValid()) + return; d->unlock(); - d->setDFBColor(brush.color()); + d->setDFBColor(color); const QRect r = d->transform.mapRect(rect).toRect(); d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height()); @@ -711,6 +714,8 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) { + if (!color.isValid()) + return; Q_D(QDirectFBPaintEngine); d->updateClip(); if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear) { |