]> git.sesse.net Git - vlc/commitdiff
playlist: playlist_NodeCreate needs the PL_LOCK.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 12 Aug 2008 21:48:54 +0000 (23:48 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 12 Aug 2008 22:57:24 +0000 (00:57 +0200)
src/playlist/engine.c
src/playlist/tree.c

index ce92f756cf53940b27ad1f25d8bc3847975e9329..c1f3ed2124630228984f08b68c3469de43813d6b 100644 (file)
@@ -98,10 +98,12 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     p_playlist->b_auto_preparse =
                         var_CreateGetBool( p_playlist, "auto-preparse" ) ;
 
+    PL_LOCK; /* playlist_NodeCreate will check for it */
     p_playlist->p_root_category = playlist_NodeCreate( p_playlist, NULL, NULL,
                                     0, NULL );
     p_playlist->p_root_onelevel = playlist_NodeCreate( p_playlist, NULL, NULL,
                                     0, p_playlist->p_root_category->p_input );
+    PL_UNLOCK;
 
     if( !p_playlist->p_root_category || !p_playlist->p_root_onelevel )
         return NULL;
index d79ec49b4a2ed2fc652dba222610049c3e24f003..c4553cc8e7bc182e3874f83fc2f8757e2b8c54db 100644 (file)
@@ -62,6 +62,7 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
     input_item_t *p_new_input = NULL;
     playlist_item_t *p_item;
 
+    PL_ASSERT_LOCKED;
     if( !psz_name ) psz_name = _("Undefined");
 
     if( !p_input )