]> git.sesse.net Git - vlc/blobdiff - modules/access/directory.c
directory: playlist_NodeCreate needs a lock.
[vlc] / modules / access / directory.c
index 49051ddf4011c24a7653df2fe56de7a33d968313..1cde31422b754126ca5b4419f24208c8c169e542 100644 (file)
@@ -483,9 +483,11 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
 
                 msg_Dbg (p_playlist, "creating subdirectory %s", psz_uri);
 
+                PL_LOCK;
                 p_node = playlist_NodeCreate( p_playlist, entry,
                                               p_parent_category,
                                               PLAYLIST_NO_REBUILD, NULL );
+                PL_UNLOCK;
 
                 /* If we had the parent in category, the it is now node.
                  * Else, we still don't have  */