diff options
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 0ad6772..1276443 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1624,9 +1624,8 @@ void QGLTextureCache::pixmapCleanupHook(QPixmap* pixmap) } #if defined(Q_WS_X11) QPixmapData *pd = pixmap->data_ptr().data(); - // Only need to delete the gl surface if the pixmap is about to be deleted - if (pd->ref == 0) - QGLContextPrivate::destroyGlSurfaceForPixmap(pd); + Q_ASSERT(pd->ref == 1); // Make sure reference counting isn't broken + QGLContextPrivate::destroyGlSurfaceForPixmap(pd); #endif } |