From: Pierre d'Herbemont Date: Tue, 8 Jul 2008 20:59:56 +0000 (+0200) Subject: macosx: Yet an other locking typo. X-Git-Tag: 0.9.0-test2~105 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=45fee8edc633c8305b282c653b89ed600fab0a7a;p=vlc macosx: Yet an other locking typo. --- diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 9be1f6b2a2..22d81f8566 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -970,6 +970,7 @@ int i_item; playlist_t * p_playlist = pl_Yield( VLCIntf ); + PL_LOCK; for( i_item = 0; i_item < (int)[o_array count]; i_item++ ) { input_item_t *p_input; @@ -985,9 +986,10 @@ /* Add the item */ /* FIXME: playlist_AddInput() can fail */ + playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT, i_position == -1 ? PLAYLIST_END : i_position + i_item, true, - false ); + true ); if( i_item == 0 && !b_enqueue ) { @@ -997,6 +999,8 @@ } vlc_gc_decref( p_input ); } + PL_UNLOCK; + [self playlistUpdated]; vlc_object_release( p_playlist ); }