1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-05 21:57:39 +00:00

fix segfault if an unknown property is requested

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19386 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ivo 2006-08-13 16:45:20 +00:00
parent f84a998765
commit c13cfd750e

View File

@ -4374,7 +4374,10 @@ if(step_sec>0) {
m_option_t* prop;
void* val;
prop = mp_property_find(cmd->args[0].v.s);
if(!prop) mp_msg(MSGT_CPLAYER,MSGL_WARN,"Unkown property: '%s'\n",cmd->args[0].v.s);
if(!prop) {
mp_msg(MSGT_CPLAYER,MSGL_WARN,"Unkown property: '%s'\n",cmd->args[0].v.s);
break;
}
/* Use m_option_print directly to get easily parseable values. */
val = calloc(1,prop->type->size);
if(m_property_do(prop,M_PROPERTY_GET,val) <= 0) {