From e66c098228320bdcc13ca975125f7b98b0f23219 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 6 Sep 2016 20:09:18 +0200 Subject: [PATCH] demux_mkv: don't crash if --ordered-chapters-files fails It just crashed. --- demux/demux_mkv_timeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c index 8affe13ac2..256e009753 100644 --- a/demux/demux_mkv_timeline.c +++ b/demux/demux_mkv_timeline.c @@ -260,7 +260,7 @@ static void find_ordered_chapter_sources(struct tl_ctx *ctx) struct playlist *pl = playlist_parse_file(opts->ordered_chapters_files, ctx->global); talloc_steal(tmp, pl); - for (struct playlist_entry *e = pl->first; e; e = e->next) + for (struct playlist_entry *e = pl ? pl->first : NULL; e; e = e->next) MP_TARRAY_APPEND(tmp, filenames, num_filenames, e->filename); } else if (ctx->demuxer->stream->uncached_type != STREAMTYPE_FILE) { MP_WARN(ctx, "Playback source is not a "