]> git.sesse.net Git - vlc/blobdiff - src/playlist/item.c
directory: Make sure we can exit and interrupt the access.
[vlc] / src / playlist / item.c
index 5d09181b2285218bb7fb5a54ed9a9cab8b64c1b3..c4e9cac55f4c0f280b3ac2526ad64a7db27e2a4d 100644 (file)
@@ -452,13 +452,10 @@ int playlist_BothAddInput( playlist_t *p_playlist,
     int i_top;
     assert( p_input );
 
-    PL_LOCK_IF( !b_locked );
-
     if( !vlc_object_alive( p_playlist ) )
-    {
-        PL_UNLOCK_IF( !b_locked );
         return VLC_EGENERIC;
-    }
+
+    PL_LOCK_IF( !b_locked );
 
     /* Add to category */
     p_item_cat = playlist_ItemNewFromInput( p_playlist, p_input );