diff options
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 2e18b48..1b499b6 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) { @@ -892,7 +897,6 @@ void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device) setCompositionMode(q->state()->compositionMode()); dirtyClip = true; setPen(q->state()->pen); - setDFBColor(pen.color()); } void QDirectFBPaintEnginePrivate::end() |