summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-27 21:24:44 +0200
committerwm4 <wm4@nowhere>2013-07-28 18:44:21 +0200
commit2fc07dcf302061c6f04a7570e2c1825bb2393513 (patch)
treed59c97d6d55905c01713ecc786b0b8995b28c3f3
parent13a0e6373ed210d8a43648136ce4011924dbe97e (diff)
downloadmpv-2fc07dcf302061c6f04a7570e2c1825bb2393513.tar.bz2
mpv-2fc07dcf302061c6f04a7570e2c1825bb2393513.tar.xz
command: mark special options as unavailable
Special options (like -v, -playlist, etc.) don't have data associated with them, so reading them with the "options" property makes no sense.
-rw-r--r--core/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/command.c b/core/command.c
index 00b6ed92f5..d60c07c7f1 100644
--- a/core/command.c
+++ b/core/command.c
@@ -1605,6 +1605,8 @@ static int mp_property_options(m_option_t *prop, int action, void *arg,
bstr0(ka->key));
if (!opt)
return M_PROPERTY_UNKNOWN;
+ if (!opt->data)
+ return M_PROPERTY_UNAVAILABLE;
switch (ka->action) {
case M_PROPERTY_GET: