Allow UI fonts to be unloaded (needed for FS#11428)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27027 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2010-06-21 20:18:52 +00:00
parent e1d8a3dc63
commit 36eeecf69b

View file

@ -449,7 +449,7 @@ int font_load(struct font* pf, const char *path)
void font_unload(int font_id) void font_unload(int font_id)
{ {
struct font* pf = sysfonts[font_id]; struct font* pf = sysfonts[font_id];
if (font_id >= SYSTEMFONTCOUNT && pf) if (font_id && pf)
{ {
if (pf->fd >= 0) if (pf->fd >= 0)
close(pf->fd); close(pf->fd);