]> git.sesse.net Git - vlc/commitdiff
Add a playlist lock. Hopefully fixes the last crash in the OSX playlist.
authorBenjamin Pracht <bigben@videolan.org>
Mon, 20 Jun 2005 17:48:25 +0000 (17:48 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Mon, 20 Jun 2005 17:48:25 +0000 (17:48 +0000)
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 );