Explorar o código

Destroy swapchain before removing the window info

This fixes an issue reported by valgrind where cleaning up the
swapchain fails because the window info is destroyed before.
fryshorts %!s(int64=11) %!d(string=hai) anos
pai
achega
944c2dc9f7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libobs-opengl/gl-x11.c

+ 1 - 1
libobs-opengl/gl-x11.c

@@ -276,9 +276,9 @@ void gl_platform_destroy(struct gl_platform *platform)
 	Display *dpy = platform->swap.wi->display;
 
 	glXMakeCurrent(dpy, None, NULL);
+	gl_platform_cleanup_swapchain(&platform->swap);
 	glXDestroyContext(dpy, platform->context);
 	gl_windowinfo_destroy(platform->swap.wi);
-	gl_platform_cleanup_swapchain(&platform->swap);
 	bfree(platform);
 }