From e915cfd4e7ca78369a17172891b5a5f8e442d880 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 28 Sep 2013 04:35:17 +0200 Subject: [PATCH] winex11: Call destroy_gl_drawable before destroying the window. --- dlls/winex11.drv/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1ff36eb1d5f..741a3030fdd 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1598,6 +1598,8 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd ) struct x11drv_thread_data *thread_data = x11drv_thread_data(); struct x11drv_win_data *data; + destroy_gl_drawable( hwnd ); + if (!(data = get_win_data( hwnd ))) return; destroy_whole_window( data, FALSE ); @@ -1609,7 +1611,6 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd ) XDeleteContext( gdi_display, (XID)hwnd, win_data_context ); release_win_data( data ); HeapFree( GetProcessHeap(), 0, data ); - destroy_gl_drawable( hwnd ); }