Commit c9bd423d authored by Clément Stenac's avatar Clément Stenac

Fix crash on delete (Refs:#205)

parent 220005ae
......@@ -663,6 +663,7 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
/* Hack we don't call playlist_Control for lock reasons */
p_playlist->status.i_status = PLAYLIST_STOPPED;
p_playlist->request.b_request = VLC_TRUE;
p_playlist->request.p_item = NULL;
msg_Info( p_playlist, "stopping playback" );
b_flag = VLC_TRUE;
}
......
......@@ -866,7 +866,7 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
i_skip = p_playlist->request.i_skip;
i_goto = p_playlist->request.i_goto;
if( p_playlist->i_index == -1 ) p_playlist->i_index = 0;
if( p_playlist->i_index < 0 ) p_playlist->i_index = 0;
p_new = p_playlist->pp_items[p_playlist->i_index];
if( i_goto >= 0 && i_goto < p_playlist->i_size )
......
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