diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/font.c | 11 |
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) | |||
594 | return &sysfont; | 594 | return &sysfont; |
595 | 595 | ||
596 | while (1) { | 596 | while (1) { |
597 | struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]); | 597 | if (buflib_allocations[font] > 0) |
598 | pf = &alloc->font; | 598 | { |
599 | if (pf && pf->height) | 599 | struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]); |
600 | return pf; | 600 | pf = &alloc->font; |
601 | if (pf && pf->height) | ||
602 | return pf; | ||
603 | } | ||
601 | if (--font < 0) | 604 | if (--font < 0) |
602 | return &sysfont; | 605 | return &sysfont; |
603 | } | 606 | } |