]> git.sesse.net Git - vlc/commitdiff
services_discovery: playlist_NodesPairCreate needs a lock.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 15 Jul 2008 11:07:23 +0000 (13:07 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 15 Jul 2008 11:21:24 +0000 (13:21 +0200)
Should fix #1708 (Adding a folder in the Mac OS X VLC *media library* result in an assertion failure). Thanks to upcoming commit "playlist: Use PL_ASSERT_LOCKED where the playlist lock should be held.".

src/playlist/services_discovery.c

index a08535287e0c63b8ba44f963be4cad97129da82a..84b4dd94a95b37ab74a81b0d8f32c084af31f672 100644 (file)
@@ -306,8 +306,10 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist,  const char *psz_modu
 
         char * psz = services_discovery_GetLocalizedName( p_sd );
         assert( psz );
+        PL_LOCK;
         playlist_NodesPairCreate( p_playlist, psz,
                 &p_cat, &p_one, false );
+        PL_UNLOCK;
         free( psz );
 
         vlc_event_attach( services_discovery_EventManager( p_sd ),