]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/wxwindows.cpp
* modules/gui/wxwindows/menus.cpp: release the wxMutexGui lock before triggering...
[vlc] / modules / gui / wxwindows / wxwindows.cpp
index 0eeb79cf53d4f8280811051f3ed6e1def12c8721..aa6fdd001ba21efff54616ea19574ff296ced4bc 100644 (file)
@@ -130,6 +130,7 @@ static int Open( vlc_object_t *p_this )
         msg_Err( p_intf, "out of memory" );
         return VLC_ENOMEM;
     }
+    memset( p_intf->p_sys, 0, sizeof( intf_sys_t ) );
 
     p_intf->pf_run = Run;
 
@@ -176,6 +177,10 @@ static void Close( vlc_object_t *p_this )
         vlc_object_release( p_intf->p_sys->p_input );
     }
 
+    vlc_mutex_lock( &p_intf->object_lock );
+    p_intf->b_dead = VLC_TRUE;
+    vlc_mutex_unlock( &p_intf->object_lock );
+
     if( p_intf->pf_show_dialog )
     {
         /* We must destroy the dialogs thread */
@@ -317,16 +322,7 @@ bool Instance::OnInit()
                                            FIND_ANYWHERE );
         if( p_playlist )
         {
-            vlc_mutex_lock( &p_playlist->object_lock );
-            if( p_playlist->i_size )
-            {
-                vlc_mutex_unlock( &p_playlist->object_lock );
-                playlist_Play( p_playlist );
-            }
-            else
-            {
-                vlc_mutex_unlock( &p_playlist->object_lock );
-            }
+            playlist_Play( p_playlist );
             vlc_object_release( p_playlist );
         }
     }