summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-12-14 10:16:07 +0000
committerNils Wallménius <nils@rockbox.org>2008-12-14 10:16:07 +0000
commita89837ac61c75e335cbb1d722872bb8ae9cbc9b8 (patch)
tree8eb1624d16fe298559619139ef13713a1e5da3da
parent0fab3e36f376ade637c896a37ff494b5e367d86d (diff)
downloadrockbox-a89837ac61c75e335cbb1d722872bb8ae9cbc9b8.tar.gz
rockbox-a89837ac61c75e335cbb1d722872bb8ae9cbc9b8.tar.bz2
rockbox-a89837ac61c75e335cbb1d722872bb8ae9cbc9b8.zip
Accept patch in FS#9637 by Keith Perri, fixing a crash when loading a cfg which specified a non existant font.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19434 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 4babe33cdb..47849cb1ce 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -820,7 +820,8 @@ void settings_apply(bool read_disk)
if ( global_settings.font_file[0]) {
snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
global_settings.font_file);
- font_load(buf);
+ if (font_load(buf) == NULL)
+ font_reset();
}
else
font_reset();