]> git.sesse.net Git - vlc/commitdiff
directory: playlist_NodeCreate needs a lock.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 15 Jul 2008 11:10:02 +0000 (13:10 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 15 Jul 2008 11:21:35 +0000 (13:21 +0200)
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  */