diff options
author | wm4 <wm4@nowhere> | 2017-05-01 19:57:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-01 19:57:56 +0200 |
commit | 24f568c06858146681decb1d4be50ef68865d136 (patch) | |
tree | eac858e011e5a1269925871d477a2b8ba3023541 /player | |
parent | b5b3aadf40b5a94d79b4ec3f1d3a1892eba01f6a (diff) | |
download | mpv-24f568c06858146681decb1d4be50ef68865d136.tar.bz2 mpv-24f568c06858146681decb1d4be50ef68865d136.tar.xz |
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.
Diffstat (limited to 'player')
-rw-r--r-- | player/configfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |