summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
}