From acf6bfb1f6f589b9edfda88d7665f3b57001279a Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Thu, 10 Jul 2014 22:08:28 +0100 Subject: [PATCH] wayland: Destroy window context before clearing the egl surface --- src/wl_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 85ca5d59..6b5b08ee 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -127,11 +127,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, void _glfwPlatformDestroyWindow(_GLFWwindow* window) { + _glfwDestroyContext(window); + if (window->wl.native) wl_egl_window_destroy(window->wl.native); - _glfwDestroyContext(window); - if (window->wl.shell_surface) wl_shell_surface_destroy(window->wl.shell_surface);