summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-29 09:30:39 +0200
committerwm4 <wm4@nowhere>2016-08-29 09:30:39 +0200
commitbda614bfd81ae4660ed6356bc124e015645ff3b0 (patch)
tree0c63d262b970bcec5827a278adbee466edbf122c
parentf42e4374d55a3b68b0c4fcb342d9cdcd5d15c9c7 (diff)
downloadmpv-bda614bfd81ae4660ed6356bc124e015645ff3b0.tar.bz2
mpv-bda614bfd81ae4660ed6356bc124e015645ff3b0.tar.xz
m_config: profile option values can be NULL
Sigh.
-rw-r--r--options/m_config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/options/m_config.c b/options/m_config.c
index 3dbbb5020a..106a8f20ee 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -953,7 +953,8 @@ struct mpv_node m_config_get_profiles(struct m_config *config)
for (int n = 0; n < profile->num_opts; n++) {
struct mpv_node *opt_entry = node_array_add(opts, MPV_FORMAT_NODE_MAP);
node_map_add_string(opt_entry, "key", profile->opts[n * 2 + 0]);
- node_map_add_string(opt_entry, "value", profile->opts[n * 2 + 1]);
+ if (profile->opts[n * 2 + 1])
+ node_map_add_string(opt_entry, "value", profile->opts[n * 2 + 1]);
}
}