From 3fcc03fb2d4b629fb7f0a72a6aa45916086c6d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 3 Aug 2009 10:12:09 +0200 Subject: Avoid painting on a null pixmap in QGraphicsShadowEffect. --- src/gui/graphicsview/qgraphicseffect.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()); -- cgit v0.12