* src/interface/interface.c, modules/gui/wxwindows/video.cpp: couple of fixes.
authorGildas Bazin <gbazin@videolan.org>
Sat, 5 Jun 2004 18:04:06 +0000 (18:04 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 5 Jun 2004 18:04:06 +0000 (18:04 +0000)
modules/gui/wxwindows/video.cpp
src/interface/interface.c

index 4cded77..fd5f65f 100644 (file)
@@ -128,11 +128,15 @@ VideoWindow::~VideoWindow()
     if( p_vout )
     {
         if( !p_intf->psz_switch_intf )
+        {
             if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
                 vout_Control( p_vout, VOUT_REPARENT );
+        }
         else
+        {
             if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
                 vout_Control( p_vout, VOUT_CLOSE );
+        }
     }
 
     p_intf->pf_request_window = NULL;
index d676ba8..3e34e12 100644 (file)
@@ -316,13 +316,13 @@ static void RunInterface( intf_thread_t *p_intf )
             break;
         }
 
+        /* Make sure the old interface is completely uninitialized */
+        module_Unneed( p_intf, p_intf->p_module );
+
         /* Provide ability to switch the main interface on the fly */
         psz_intf = p_intf->psz_switch_intf;
         p_intf->psz_switch_intf = NULL;
 
-        /* Make sure the old interface is completely uninitialized */
-        module_Unneed( p_intf, p_intf->p_module );
-
         vlc_mutex_lock( &p_intf->object_lock );
         p_intf->b_die = VLC_FALSE;
         p_intf->b_dead = VLC_FALSE;