mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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).
This commit is contained in:
parent
d3cd4ad933
commit
b43f19cb50
1 changed files with 5 additions and 3 deletions
8
vt.c
8
vt.c
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue