1
0
Fork 0
forked from len0rd/rockbox

prevent the parser crashing if a font fails to load and is refresencd in more than one viewport

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27443 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-07-16 01:05:24 +00:00
parent 765c4f1a97
commit bb236ce89c

View file

@ -2219,7 +2219,10 @@ static bool skin_load_fonts(struct wps_data *data)
struct skin_font *font = &skinfonts[font_id-FONT_FIRSTUSERFONT]; struct skin_font *font = &skinfonts[font_id-FONT_FIRSTUSERFONT];
if (!font->name) if (!font->name)
{ {
DEBUGF("font %d not specified\n", font_id); if (success)
{
DEBUGF("font %d not specified\n", font_id);
}
success = false; success = false;
continue; continue;
} }
@ -2238,6 +2241,7 @@ static bool skin_load_fonts(struct wps_data *data)
DEBUGF("Unable to load font %d: '%s.fnt'\n", DEBUGF("Unable to load font %d: '%s.fnt'\n",
font_id, font->name); font_id, font->name);
success = false; success = false;
font->name = NULL;
continue; continue;
} }