From 0b30316261867fdf79f6b847ba4965e1d787adcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 12 Jan 2020 01:19:41 +0100 Subject: [PATCH] render: don't bother trying to lookup glyph for empty cells Depending on the font, it may not have an entry for code point '0', which will cause us to try to load fallback fonts. --- render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render.c b/render.c index 3dd901be..5f2aff69 100644 --- a/render.c +++ b/render.c @@ -417,7 +417,8 @@ render_cell(struct terminal *term, pixman_image_t *pix, } struct font *font = attrs_to_font(term, &cell->attrs); - const struct glyph *glyph = font_glyph_for_wc(font, cell->wc); + const struct glyph *glyph = cell->wc != 0 + ? font_glyph_for_wc(font, cell->wc) : NULL; int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;