command: fix "cycle"/"add" not working on most properties

Oops, this is kind of important, isn't it?

Stopped working for properties which don't implement
M_PROPERTY_GET_CONSTRICTED_TYPE directly, as do_action() goes to the
property directly, while m_property_do() does a fallback.
This commit is contained in:
wm4 2016-09-18 17:55:27 +02:00
parent 2415b69572
commit 08432fcbd1
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ int m_property_do(struct mp_log *log, const struct m_property *prop_list,
M_PROPERTY_NOT_IMPLEMENTED)
return r;
// Fallback to m_option
r = do_action(prop_list, name, M_PROPERTY_GET_CONSTRICTED_TYPE, &opt, ctx);
r = m_property_do(log, prop_list, name, M_PROPERTY_GET_CONSTRICTED_TYPE,
&opt, ctx);
if (r <= 0)
return r;
assert(opt.type);