From 24f568c06858146681decb1d4be50ef68865d136 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 May 2017 19:57:17 +0200 Subject: player: fix potential segfault when playing dvd:// with DVD disabled Tries to access the options, which are obviously not allocated if there is no DVD support compiled. Fixes #4393. --- player/configfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/configfiles.c b/player/configfiles.c index d87f83c1f7..f92d4ca96b 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -181,7 +181,7 @@ static char *mp_get_playback_resume_config_filename(struct MPContext *mpctx, realpath = mp_path_join(tmp, cwd, fname); } } - if (bstr_startswith0(bfname, "dvd://") && opts->dvd_opts->device) + if (bstr_startswith0(bfname, "dvd://") && opts->dvd_opts && opts->dvd_opts->device) realpath = talloc_asprintf(tmp, "%s - %s", realpath, opts->dvd_opts->device); if ((bstr_startswith0(bfname, "br://") || bstr_startswith0(bfname, "bd://") || bstr_startswith0(bfname, "bluray://")) && opts->bluray_device) -- cgit v1.2.3