diff --git a/scene_xrender.cpp b/scene_xrender.cpp index ede5d47ad4..434bc5eafa 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -139,6 +139,7 @@ SceneXrender::~SceneXrender() } XRenderFreePicture( display(), front ); XRenderFreePicture( display(), buffer ); + buffer = None; wspace->destroyOverlay(); foreach( Window* w, windows ) delete w; @@ -153,8 +154,6 @@ bool SceneXrender::initFailed() const // so it is done manually using this buffer, void SceneXrender::createBuffer() { - if( buffer != None ) - XRenderFreePicture( display(), buffer ); Pixmap pixmap = XCreatePixmap( display(), rootWindow(), displayWidth(), displayHeight(), DefaultDepth( display(), DefaultScreen( display()))); buffer = XRenderCreatePicture( display(), pixmap, format, 0, 0 ); XFreePixmap( display(), pixmap ); // The picture owns the pixmap now