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:
parent
765c4f1a97
commit
bb236ce89c
1 changed files with 5 additions and 1 deletions
|
|
@ -2219,7 +2219,10 @@ static bool skin_load_fonts(struct wps_data *data)
|
|||
struct skin_font *font = &skinfonts[font_id-FONT_FIRSTUSERFONT];
|
||||
if (!font->name)
|
||||
{
|
||||
DEBUGF("font %d not specified\n", font_id);
|
||||
if (success)
|
||||
{
|
||||
DEBUGF("font %d not specified\n", font_id);
|
||||
}
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2238,6 +2241,7 @@ static bool skin_load_fonts(struct wps_data *data)
|
|||
DEBUGF("Unable to load font %d: '%s.fnt'\n",
|
||||
font_id, font->name);
|
||||
success = false;
|
||||
font->name = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue