wayland: Destroy window context before clearing the egl surface

This commit is contained in:
Ricardo Vieira 2014-07-10 22:08:28 +01:00
parent 2c5c6a1ff5
commit acf6bfb1f6

View File

@ -127,11 +127,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
void _glfwPlatformDestroyWindow(_GLFWwindow* window) void _glfwPlatformDestroyWindow(_GLFWwindow* window)
{ {
_glfwDestroyContext(window);
if (window->wl.native) if (window->wl.native)
wl_egl_window_destroy(window->wl.native); wl_egl_window_destroy(window->wl.native);
_glfwDestroyContext(window);
if (window->wl.shell_surface) if (window->wl.shell_surface)
wl_shell_surface_destroy(window->wl.shell_surface); wl_shell_surface_destroy(window->wl.shell_surface);