From 4bcd6ec41df41903f54260822ea14b9dc737fcec Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 23 Mar 2015 04:50:51 +0100 Subject: player: relax assertion on mp_set_playlist_entry This assertion crashed when e was NULL, which can happen when using force. --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/loadfile.c b/player/loadfile.c index 5e78ed430c..992cf99b97 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1419,7 +1419,7 @@ void mp_play_files(struct MPContext *mpctx) // e must be on the mpctx->playlist. void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e) { - assert(playlist_entry_to_index(mpctx->playlist, e) >= 0); + assert(!e || playlist_entry_to_index(mpctx->playlist, e) >= 0); mpctx->playlist->current = e; mpctx->playlist->current_was_replaced = false; mpctx->stop_play = PT_CURRENT_ENTRY; -- cgit v1.2.3