summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 15:50:57 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 15:50:57 (GMT)
commit88fd79fc3a52ef6d3649579879a72a8badc3fb4b (patch)
tree6094abae88cab3efbe2a0eb02a63730e5e7e1686 /src/gui/image
parentf5caf1998dea7dbad25dc6aed5a00fc33e8a5818 (diff)
parente18eac95ad4b69ebe53e51c65416f1c94275e10a (diff)
downloadQt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.zip
Qt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.tar.gz
Qt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap_x11.cpp6
-rw-r--r--src/gui/image/qpixmapdata_p.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 9d99d2e..725caeb 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;
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index df26c42..abb3181 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -110,6 +110,7 @@ protected:
private:
friend class QPixmap;
friend class QGLContextPrivate;
+ friend class QX11PixmapData;
QAtomicInt ref;
int detach_no;