From 8b783e2c3ccbe07f42df1a13b3b63d27467035d1 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Tue, 12 Aug 2008 23:48:54 +0200 Subject: [PATCH] playlist: playlist_NodeCreate needs the PL_LOCK. --- src/playlist/engine.c | 2 ++ src/playlist/tree.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/playlist/engine.c b/src/playlist/engine.c index ce92f756cf..c1f3ed2124 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -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; diff --git a/src/playlist/tree.c b/src/playlist/tree.c index d79ec49b4a..c4553cc8e7 100644 --- a/src/playlist/tree.c +++ b/src/playlist/tree.c @@ -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 ) -- 2.39.2