diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-12 00:19:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-12 00:19:41 +0000 |
| commit | 0b30316261867fdf79f6b847ba4965e1d787adcd (patch) | |
| tree | 01169b68a7d17fe823b9a385a6c002ef10d3b7d9 /render.c | |
| parent | Merge branch 'switch-based-keymap-lookup' (diff) | |
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.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |
