summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-10-06 11:46:13 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-10-06 11:51:08 (GMT)
commitcb368e06bea269422efcbdbe8136d424b6ff5052 (patch)
tree9fcf875867db917774107c8901fc2bec74acffd8 /src
parenta6bf8c28a8b8792167f6c93a08e871376651ba1a (diff)
downloadQt-cb368e06bea269422efcbdbe8136d424b6ff5052.zip
Qt-cb368e06bea269422efcbdbe8136d424b6ff5052.tar.gz
Qt-cb368e06bea269422efcbdbe8136d424b6ff5052.tar.bz2
Fixed an assert occuring on X11 when destroying QPixmaps under GL.
The cleanup code for the QX11PixmapData was called incorrectly for QGLPixmapData. Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qgl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3940a08..3f96d1c 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1654,8 +1654,10 @@ void QGLTextureCache::pixmapCleanupHook(QPixmap* pixmap)
}
#if defined(Q_WS_X11)
QPixmapData *pd = pixmap->data_ptr().data();
- Q_ASSERT(pd->ref == 1); // Make sure reference counting isn't broken
- QGLContextPrivate::destroyGlSurfaceForPixmap(pd);
+ if (pd->classId() == QPixmapData::X11Class) {
+ Q_ASSERT(pd->ref == 1); // Make sure reference counting isn't broken
+ QGLContextPrivate::destroyGlSurfaceForPixmap(pd);
+ }
#endif
}