mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-30 05:19:19 +00:00
Be a little more defensive
This commit is contained in:
parent
0ad9a15491
commit
f94051e752
1 changed files with 1 additions and 1 deletions
|
|
@ -474,7 +474,7 @@ cell_metrics(PyObject *s) {
|
|||
|
||||
unsigned int
|
||||
glyph_id_for_codepoint(const PyObject *s, char_type cp) {
|
||||
return FT_Get_Char_Index(((Face*)s)->face, cp);
|
||||
return s ? FT_Get_Char_Index(((Face*)s)->face, cp) : 0;
|
||||
}
|
||||
|
||||
typedef enum { NOT_COLORED, CBDT_COLORED, COLR_V0_COLORED, COLR_V1_COLORED } GlyphColorType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue