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
|
|
@ -2218,8 +2218,11 @@ static bool skin_load_fonts(struct wps_data *data)
|
||||||
/* now find the corresponding skin_font */
|
/* now find the corresponding skin_font */
|
||||||
struct skin_font *font = &skinfonts[font_id-FONT_FIRSTUSERFONT];
|
struct skin_font *font = &skinfonts[font_id-FONT_FIRSTUSERFONT];
|
||||||
if (!font->name)
|
if (!font->name)
|
||||||
|
{
|
||||||
|
if (success)
|
||||||
{
|
{
|
||||||
DEBUGF("font %d not specified\n", font_id);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue