From dce6be54cae7b3a5316004a2962381a74fb13486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sat, 9 Jun 2007 06:27:22 +0000 Subject: [PATCH] Fix pixmap leak with strict binding. svn path=/trunk/KDE/kdebase/workspace/; revision=673154 --- scene_opengl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index b648476da2..ecdb0aa55f 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -829,9 +829,10 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size, { // tfp mode, simply bind the pixmap to texture if( mTexture == None ) glGenTextures( 1, &mTexture ); - if( bound_glxpixmap != None && !strict_binding ) // release old if needed + if( bound_glxpixmap != None ) // release old if needed { - glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT ); + if( !strict_binding ) + glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT ); glXDestroyGLXPixmap( display(), bound_glxpixmap ); } static const int attrs[] =