]> git.sesse.net Git - vlc/blobdiff - modules/video_output/xcb/glx.c
GLX: destroy context before window
[vlc] / 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 */