diff --git a/lemonbar.c b/lemonbar.c index 8d6b72f..620649e 100644 --- a/lemonbar.c +++ b/lemonbar.c @@ -716,6 +716,11 @@ parse (char *text) void font_load (const char *pattern) { + if (font_count >= MAX_FONT_COUNT) { + fprintf(stderr, "Max font count reached. Could not load font \"%s\"\n", pattern); + return; + } + xcb_query_font_cookie_t queryreq; xcb_query_font_reply_t *font_info; xcb_void_cookie_t cookie;