Commit 5feeba27 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/playlist: add missing error handling

parent 2335e370
...@@ -1163,15 +1163,14 @@ ...@@ -1163,15 +1163,14 @@
o_one_item = [o_array objectAtIndex: i_item]; o_one_item = [o_array objectAtIndex: i_item];
p_input = [self createItem: o_one_item]; p_input = [self createItem: o_one_item];
if( !p_input ) if( !p_input )
{
continue; continue;
}
/* Add the item */ /* Add the item */
/* FIXME: playlist_AddInput() can fail */ int returnValue = playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT, i_position == -1 ? PLAYLIST_END : i_position + i_item, b_usingPlaylist, pl_Locked );
if (returnValue != VLC_SUCCESS) {
playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT, i_position == -1 ? PLAYLIST_END : i_position + i_item, b_usingPlaylist, vlc_gc_decref( p_input );
pl_Locked ); continue;
}
if( i_item == 0 && !b_enqueue ) if( i_item == 0 && !b_enqueue )
{ {
......
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