Commit b9dc1b7d authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/playlist: add missing error handling

(cherry picked from commit 5feeba277311d1d3215016dc7ce1e17e79c922f1)
parent efbf668d
...@@ -1106,15 +1106,14 @@ ...@@ -1106,15 +1106,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