summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-04-22 12:05:08 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-04-22 12:12:26 +0200
commite8468f21d24b85114a8841413f9328a17f7bc54d (patch)
treefa154d5902913c0393a88a13de7a1aabdc864309 /tests/auto/qpainter
parent5cba8ea7d6b793ba0012dfc387e6859ace7c664a (diff)
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 'tests/auto/qpainter')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 8b43f9bbd6..c81bf674f7 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -3792,8 +3792,11 @@ void tst_QPainter::imageBlending()
void tst_QPainter::paintOnNullPixmap()
{
+ QPixmap pix(16, 16);
+
QPixmap textPixmap;
QPainter p(&textPixmap);
+ p.drawPixmap(10, 10, pix);
p.end();
QPixmap textPixmap2(16,16);