mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 11:55:42 +00:00
Win32 gui has the same m_option_print error handling bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25740 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c9a1648cbc
commit
acd409b4bf
@ -130,13 +130,15 @@ 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user