summaryrefslogtreecommitdiff
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 16:50:57 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 16:50:57 +0100
commit88fd79fc3a52ef6d3649579879a72a8badc3fb4b (patch)
tree6094abae88cab3efbe2a0eb02a63730e5e7e1686 /src/gui/image/qpixmap_x11.cpp
parentf5caf1998dea7dbad25dc6aed5a00fc33e8a5818 (diff)
parente18eac95ad4b69ebe53e51c65416f1c94275e10a (diff)
downloadqt4-tools-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.tar.gz
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 9d99d2e49d..725caebb97 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1288,6 +1288,12 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
0, 0, 0, 0, 0, 0, w, h);
release();
*this = newData;
+ // the new QX11PixmapData object isn't referenced yet, so
+ // ref it
+ ref.ref();
+
+ // the below is to make sure the QX11PixmapData destructor
+ // doesn't delete our newly created render picture
newData.hd = 0;
newData.x11_mask = 0;
newData.picture = 0;