# HG changeset patch # User reimar # Date 1200241533 0 # Node ID 363e217ce9fd4ce67da0bbe799488f4af52d599d # Parent 25b40c769b0611f30fa5dc294e6d7fc9c3303bfc Win32 gui has the same m_option_print error handling bug diff -r 25b40c769b06 -r 363e217ce9fd gui/win32/wincfg.c --- a/gui/win32/wincfg.c Sun Jan 13 16:22:43 2008 +0000 +++ b/gui/win32/wincfg.c Sun Jan 13 16:25:33 2008 +0000 @@ -130,13 +130,15 @@ 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); }