Fix a crash of accessing deleted paintengine
authorMichal Klocek <michal.klocek@digia.com>
Thu, 20 Feb 2014 15:50:15 +0000 (16:50 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 14 Mar 2014 17:13:34 +0000 (18:13 +0100)
commit72fe9f1d0df9bf2cb49306aea571a88056591f6d
tree74b3680c580312aa7cfe6d60d68c4ec281f84f43
parent45f264b682e0b2ad7a162bd75b702837fe04c06a
Fix a crash of accessing deleted paintengine

When painting to QPixmap with QBlitterPaintEngine and dfb
PaintEngine have PaintDevice (pdev) as QImage. Painter code
uses PaintDevice::paintEngine() to refer to paintEngine.
This will became dangling pointer since QDirectFbBlitter::doLock()
will delete QImage. Instead return QPixmap as PaintDevice.

Change-Id: Idfac919b6438a82b412020e441e0a102e4a2a052
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
src/gui/painting/qpaintengine_blitter.cpp