]> git.sesse.net Git - vlc/commitdiff
MSW: release the HICON later
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 5 Sep 2011 23:16:27 +0000 (01:16 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 5 Sep 2011 23:18:26 +0000 (01:18 +0200)
modules/video_output/msw/events.c

index 7c7aef0aaa9c2cd3da07eb22caca133672d031fb..51de721f644aa533f3bccc2aa55a70cd5017aa02 100644 (file)
@@ -708,13 +708,13 @@ static void DirectXCloseWindow( event_thread_t *p_event )
         vout_display_DeleteWindow( vd, p_event->parent_window );
     p_event->hwnd = NULL;
 
-    if( p_event->vlc_icon )
-        DestroyIcon( p_event->vlc_icon );
-
     HINSTANCE hInstance = GetModuleHandle(NULL);
     UnregisterClass( p_event->class_video, hInstance );
     UnregisterClass( p_event->class_main, hInstance );
 
+    if( p_event->vlc_icon )
+        DestroyIcon( p_event->vlc_icon );
+
 #ifndef UNDER_CE
     DestroyCursor( p_event->cursor_empty );
 #endif