diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-24 15:50:57 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-24 15:50:57 (GMT) |
commit | 88fd79fc3a52ef6d3649579879a72a8badc3fb4b (patch) | |
tree | 6094abae88cab3efbe2a0eb02a63730e5e7e1686 /src/gui/image | |
parent | f5caf1998dea7dbad25dc6aed5a00fc33e8a5818 (diff) | |
parent | e18eac95ad4b69ebe53e51c65416f1c94275e10a (diff) | |
download | Qt-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.cpp | 6 | ||||
-rw-r--r-- | src/gui/image/qpixmapdata_p.h | 1 |
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; |