m_option: fix segfault in parse_chmap

This commit is contained in:
Rudolf Polzer 2013-05-14 14:45:06 +02:00
parent bc8815d69f
commit 3edb563b23
1 changed files with 2 additions and 1 deletions

View File

@ -1635,7 +1635,8 @@ static int parse_chmap(const m_option_t *opt, struct bstr name,
return M_OPT_INVALID;
}
*(struct mp_chmap *)dst = res;
if (dst)
*(struct mp_chmap *)dst = res;
return 1;
}