]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
Merge [11470],[11471],[11474] and [11475] - Closes: #205
[vlc] / modules / gui / macosx / playlist.m
index 851a0601ff012c35307a0d7bb65436c1fc43d9e4..8674a4300346fc923503a81dd4ebf98c649a0c2a 100644 (file)
@@ -367,6 +367,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
 
     if ( p_temp_item )
     {
+        vlc_mutex_lock( &p_playlist->object_lock );
         while( p_temp_item->i_parents > 0 )
         {
             int i;
@@ -377,6 +378,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
                     if( p_temp_item->pp_parents[i]->p_parent == p_node )
                     {
                         vlc_object_release( p_playlist );
+                        vlc_mutex_unlock( &p_playlist->object_lock );
                         return YES;
                     }
                     else
@@ -387,6 +389,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
                 }
             }
         }
+        vlc_mutex_unlock( &p_playlist->object_lock );
     }
 
     vlc_object_release( p_playlist );