diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 640245646a..f15481afcc 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -203,9 +203,7 @@ SceneOpenGL::~SceneOpenGL() ++it ) (*it).free(); // do cleanup after initBuffer() - if( buffer == rootWindow()) - glXDestroyWindow( display(), glxbuffer ); - else if( wspace->overlayWindow()) + if( wspace->overlayWindow()) { glXDestroyWindow( display(), glxbuffer ); XDestroyWindow( display(), buffer );