summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/font.c')
-rw-r--r--firmware/font.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/font.c b/firmware/font.c
index f00ff0e327..0546061a15 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -594,10 +594,13 @@ struct font* font_get(int font)
return &sysfont;
while (1) {
- struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]);
- pf = &alloc->font;
- if (pf && pf->height)
- return pf;
+ if (buflib_allocations[font] > 0)
+ {
+ struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]);
+ pf = &alloc->font;
+ if (pf && pf->height)
+ return pf;
+ }
if (--font < 0)
return &sysfont;
}