mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Do not font_unload() failed fonts when aborting a skin load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30714 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2e58d5935d
commit
b683874e98
1 changed files with 4 additions and 1 deletions
|
|
@ -1706,7 +1706,10 @@ static bool skin_load_fonts(struct wps_data *data)
|
||||||
if (!success || data->font_ids == NULL)
|
if (!success || data->font_ids == NULL)
|
||||||
{
|
{
|
||||||
while (font_count > 0)
|
while (font_count > 0)
|
||||||
font_unload(id_array[--font_count]);
|
{
|
||||||
|
if(id_array[--font_count] != -1)
|
||||||
|
font_unload(id_array[font_count]);
|
||||||
|
}
|
||||||
data->font_ids = NULL;
|
data->font_ids = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue