summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-03 08:12:09 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-03 08:12:09 (GMT)
commit3fcc03fb2d4b629fb7f0a72a6aa45916086c6d06 (patch)
treec533d221eb71ebbab9489c2c8d7dae5bc5b63799 /src/gui
parent2c277a362ff1961a4ffefe6f0787efbe40ebce1b (diff)
downloadQt-3fcc03fb2d4b629fb7f0a72a6aa45916086c6d06.zip
Qt-3fcc03fb2d4b629fb7f0a72a6aa45916086c6d06.tar.gz
Qt-3fcc03fb2d4b629fb7f0a72a6aa45916086c6d06.tar.bz2
Avoid painting on a null pixmap in QGraphicsShadowEffect.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicseffect.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicseffect.cpp b/src/gui/graphicsview/qgraphicseffect.cpp
index 37e3d8c..17506bc 100644
--- a/src/gui/graphicsview/qgraphicseffect.cpp
+++ b/src/gui/graphicsview/qgraphicseffect.cpp
@@ -726,6 +726,8 @@ void QGraphicsShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *sourc
// Clip to device rect to avoid huge pixmaps.
effectRect &= source->deviceRect();
effectRect |= effectRect.translated(-shadowOffset);
+ if (effectRect.isEmpty())
+ return; // nothing to paint;
}
QPixmap pixmap(effectRect.size());