summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-03-23 04:50:51 +0100
committerwm4 <wm4@nowhere>2015-03-26 00:04:08 +0100
commit4bcd6ec41df41903f54260822ea14b9dc737fcec (patch)
tree21e82bd082ab1e0d8b37c43b916663aefb189fb7
parent8c43e12b20a52dc61b53bc3eec779aa07b8c8220 (diff)
downloadmpv-4bcd6ec41df41903f54260822ea14b9dc737fcec.tar.bz2
mpv-4bcd6ec41df41903f54260822ea14b9dc737fcec.tar.xz
player: relax assertion on mp_set_playlist_entry
This assertion crashed when e was NULL, which can happen when using force.
-rw-r--r--player/loadfile.c2
1 files changed, 1 insertions, 1 deletions
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;