summaryrefslogtreecommitdiffstats
path: root/core/m_option.c
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2013-05-14 14:45:06 +0200
committerRudolf Polzer <divverent@xonotic.org>2013-05-14 14:45:06 +0200
commit3edb563b238b1c1d0fe1c58f89186655bbc439ad (patch)
tree0aab17970463937caa5375bbc8495ed1353e0a8f /core/m_option.c
parentbc8815d69f4579ae1b87afecf72c86984441064c (diff)
downloadmpv-3edb563b238b1c1d0fe1c58f89186655bbc439ad.tar.bz2
mpv-3edb563b238b1c1d0fe1c58f89186655bbc439ad.tar.xz
m_option: fix segfault in parse_chmap
Diffstat (limited to 'core/m_option.c')
-rw-r--r--core/m_option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/m_option.c b/core/m_option.c
index fcf8cc6a67..c19d6ae15b 100644
--- a/core/m_option.c
+++ b/core/m_option.c
@@ -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;
}