winex11: Call destroy_gl_drawable before destroying the window.

This commit is contained in:
Sebastian Lackner 2013-09-28 04:35:17 +02:00 committed by Alexandre Julliard
parent c7afb0bb88
commit e915cfd4e7

View file

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