summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-04-22 10:05:08 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-04-22 10:12:26 (GMT)
commite8468f21d24b85114a8841413f9328a17f7bc54d (patch)
treefa154d5902913c0393a88a13de7a1aabdc864309 /src/gui/painting/qpainter.cpp
parent5cba8ea7d6b793ba0012dfc387e6859ace7c664a (diff)
downloadQt-e8468f21d24b85114a8841413f9328a17f7bc54d.zip
Qt-e8468f21d24b85114a8841413f9328a17f7bc54d.tar.gz
Qt-e8468f21d24b85114a8841413f9328a17f7bc54d.tar.bz2
Fix crash in drawPixmap when painting on a null pixmap
We need to check if the engine is null before we do the thread test. Reviewed-by: Thiago
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index ffb273e..65d87fa 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5167,6 +5167,9 @@ void QPainter::drawPixmap(const QPointF &p, const QPixmap &pm)
Q_D(QPainter);
+ if (!d->engine)
+ return;
+
#ifndef QT_NO_DEBUG
qt_painter_thread_test(d->device->devType(), "drawPixmap()");
#endif
@@ -5176,9 +5179,6 @@ void QPainter::drawPixmap(const QPointF &p, const QPixmap &pm)
return;
}
- if (!d->engine)
- return;
-
qreal x = p.x();
qreal y = p.y();