From 50be9242852756aac6fd82b0531ed92eeb44c754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 31 May 2021 17:11:58 +0200 Subject: [PATCH] render: handle fcft_glyph_rasterize() failure correctly --- render.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/render.c b/render.c index 894c74db..259d4499 100644 --- a/render.c +++ b/render.c @@ -582,9 +582,14 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (single == NULL && grapheme == NULL) { xassert(base != 0); single = fcft_glyph_rasterize(font, base, term->font_subpixel); - glyph_count = 1; - glyphs = &single; - cell_cols = single->cols; + if (single == NULL) { + glyph_count = 0; + cell_cols = 1; + } else { + glyph_count = 1; + glyphs = &single; + cell_cols = single->cols; + } } }