Mercurial > mplayer.hg
changeset 19380:64f9a6ce71e1
fix segfault if an unknown property is requested
author | ivo |
---|---|
date | Sun, 13 Aug 2006 16:45:20 +0000 |
parents | 66e7e52a995e |
children | 8332d5ecf5f1 |
files | mplayer.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Sun Aug 13 15:14:17 2006 +0000 +++ b/mplayer.c Sun Aug 13 16:45:20 2006 +0000 @@ -4374,7 +4374,10 @@ 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) {