]> git.sesse.net Git - vlc/commitdiff
GLX: destroy context before window
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 1 May 2010 17:58:26 +0000 (20:58 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 1 May 2010 17:58:26 +0000 (20:58 +0300)
modules/video_output/xcb/glx.c

index 573ea248961a11b1dd039f55356dda76de3eb5e6..b67c8b532bb391b64c81fac933a0636ad50efa9b 100644 (file)
@@ -414,13 +414,12 @@ static void Close (vlc_object_t *obj)
     if (sys->ctx != NULL)
     {
         if (sys->v1_3)
-        {
             glXMakeContextCurrent (dpy, None, None, NULL);
-            glXDestroyWindow (dpy, sys->glwin);
-        }
         else
             glXMakeCurrent (dpy, None, NULL);
         glXDestroyContext (dpy, sys->ctx);
+        if (sys->v1_3)
+            glXDestroyWindow (dpy, sys->glwin);
     }
 
     /* show the default cursor */