Commit 458c3d8f authored by Benjamin Pracht's avatar Benjamin Pracht

Add a playlist lock. Hopefully fixes the last crash in the OSX playlist.

parent 6414dbd6
...@@ -367,6 +367,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -367,6 +367,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
if ( p_temp_item ) if ( p_temp_item )
{ {
vlc_mutex_lock( &p_playlist->object_lock );
while( p_temp_item->i_parents > 0 ) while( p_temp_item->i_parents > 0 )
{ {
int i; int i;
...@@ -377,6 +378,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -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 ) if( p_temp_item->pp_parents[i]->p_parent == p_node )
{ {
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
vlc_mutex_unlock( &p_playlist->object_lock );
return YES; return YES;
} }
else else
...@@ -387,6 +389,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -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 ); vlc_object_release( p_playlist );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment