diff --git a/firmware/font.c b/firmware/font.c
index f00ff0e..7d28368 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -594,14 +614,17 @@ 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;
}
-}
+}
static int pf_to_handle(struct font* pf)
{