Don't update screen ModeID if it is 0, as it gets written in a format which NetSurf

then interprets as a valid ModeID.

svn path=/trunk/netsurf/; revision=8077
This commit is contained in:
Chris Young 2009-06-27 23:01:51 +00:00
parent e616704164
commit 5da3d5aa32
1 changed files with 6 additions and 3 deletions

View File

@ -1205,9 +1205,12 @@ void ami_gui_opts_use(void)
}
GetAttr(GETSCREENMODE_DisplayID,gow->gadgets[GID_OPTS_SCREENMODE],(ULONG *)&data);
if(option_modeid) free(option_modeid);
option_modeid = malloc(20);
sprintf(option_modeid,"0x%lx",data);
if(data)
{
if(option_modeid) free(option_modeid);
option_modeid = malloc(20);
sprintf(option_modeid,"0x%lx",data);
}
GetAttr(GETFILE_Drawer,gow->gadgets[GID_OPTS_THEME],(ULONG *)&data);
if(option_theme) free(option_theme);