diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-13 16:22:43 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-13 16:22:43 +0000 |
commit | c9a1648cbcceaf66beca823cbacbe8c2b29e9228 (patch) | |
tree | 1bae59333e042a5fb7e320e7b59edbba3b4cc484 | |
parent | de66cc47fa0800b6db23295a674e8b98809e7a05 (diff) |
Fix 100l: error check for m_option_print was unreachable
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25739 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | gui/cfg.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -293,11 +293,14 @@ int cfg_write( void ) for ( i=0;gui_opts[i].name;i++ ) { char* v = m_option_print(&gui_opts[i],gui_opts[i].p); + if(v == (char *)-1) { + mp_msg(MSGT_GPLAYER,MSGL_WARN,MSGTR_UnableToSaveOption, gui_opts[i].name); + v = NULL; + } if(v) { fprintf( f,"%s = \"%s\"\n",gui_opts[i].name, v); free(v); - } else if((int)v == -1) - mp_msg(MSGT_GPLAYER,MSGL_WARN,MSGTR_UnableToSaveOption, gui_opts[i].name); + } } fclose( f ); } |