summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-23 02:03:51 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-23 02:03:51 +0000
commit0a776db62a22fed1731f058282047c682668cc66 (patch)
treebea864a01ac6bfeb6c80f5eb59d8792deef593b2 /firmware/font.c
parenta5c9c086b7e4e0407831e4a58b7a0b9dc1bb8c56 (diff)
downloadrockbox-0a776db62a22fed1731f058282047c682668cc66.tar.gz
rockbox-0a776db62a22fed1731f058282047c682668cc66.tar.bz2
rockbox-0a776db62a22fed1731f058282047c682668cc66.zip
redo r27027 to hopefully fix data aborts when loading a theme
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27071 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/font.c')
-rw-r--r--firmware/font.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/font.c b/firmware/font.c
index b4cead79d9..c5348d54ff 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -453,7 +453,10 @@ void font_unload(int font_id)
{
if (pf->fd >= 0)
close(pf->fd);
- sysfonts[font_id] = NULL;
+ if (font_id == FONT_UI)
+ font_reset(pf);
+ else if (font_id >= SYSTEMFONTCOUNT)
+ sysfonts[font_id] = NULL;
}
}