aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-13 16:22:43 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-13 16:22:43 +0000
commitc9a1648cbcceaf66beca823cbacbe8c2b29e9228 (patch)
tree1bae59333e042a5fb7e320e7b59edbba3b4cc484
parentde66cc47fa0800b6db23295a674e8b98809e7a05 (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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/cfg.c b/gui/cfg.c
index 01dbca7340..821e7e4990 100644
--- a/gui/cfg.c
+++ b/gui/cfg.c
@@ -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 );
}