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.
This commit is contained in:
wm4 2013-07-27 21:24:44 +02:00
parent 13a0e6373e
commit 2fc07dcf30
1 changed files with 2 additions and 0 deletions

View File

@ -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: