diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-11-02 19:11:14 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-11-02 19:11:14 +0000 |
| commit | b43f19cb50d8f617145ab7825e3df1d6a9ff299c (patch) | |
| tree | f8b915f0af661c1d6e39669904b64540482e8002 | |
| parent | char32: use utf8proc_charwidth() instead of wcwidth(), when available (diff) | |
vt: don't call fcft_precompose() if font is NULL
This fixes a crash when doing a partial PGO build (where we don't have
any fonts available).
| -rw-r--r-- | vt.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -763,9 +763,11 @@ action_utf8_print(struct terminal *term, char32_t wc) bool comb_from_primary; bool pre_from_primary; - char32_t precomposed = fcft_precompose( - term->fonts[0], base, wc, &base_from_primary, - &comb_from_primary, &pre_from_primary); + char32_t precomposed = term->fonts[0] != NULL + ? fcft_precompose( + term->fonts[0], base, wc, &base_from_primary, + &comb_from_primary, &pre_from_primary) + : (char32_t)-1; int precomposed_width = c32width(precomposed); |
