summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-07 13:34:31 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-07 13:36:45 (GMT)
commit56d84a7dcbbaee6402d1d43bba879b135839ad61 (patch)
tree65b63b10ad111bd1c993d6de723b6257425b7576 /src/gui
parentdfa284220498a1e32ab3133f203bcb41cfa136b7 (diff)
downloadQt-56d84a7dcbbaee6402d1d43bba879b135839ad61.zip
Qt-56d84a7dcbbaee6402d1d43bba879b135839ad61.tar.gz
Qt-56d84a7dcbbaee6402d1d43bba879b135839ad61.tar.bz2
Don't crash if we are drawing an empty image.
Reviewed-by: gunnar
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 74456dd..b260f41 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2542,6 +2542,9 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
qDebug() << " - QRasterPaintEngine::drawImage(), r=" << r << " sr=" << sr << " image=" << img.size() << "depth=" << img.depth();
#endif
+ if (r.isEmpty())
+ return;
+
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
const bool aa = s->flags.antialiased || s->flags.bilinear;