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.
This commit is contained in:
fryshorts 2014-05-13 22:44:49 +02:00
parent 739c58187c
commit 944c2dc9f7

View File

@ -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);
}