1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

Fix the segfault in case of missing arg for flag options

in config files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10356 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2003-07-01 09:26:49 +00:00
parent 1639ad0ba3
commit 2611700458

View File

@ -75,6 +75,7 @@ static char* dup_printf(const char *fmt, ...) {
static int parse_flag(m_option_t* opt,char *name, char *param, void* dst, int src) {
if (src == M_CONFIG_FILE) {
if(!param) return M_OPT_MISSING_PARAM;
if (!strcasecmp(param, "yes") || /* any other language? */
!strcasecmp(param, "on") ||
!strcasecmp(param, "ja") ||