[cff1] Fix null dereference on memory alloc failure
This commit is contained in:
parent
8df9aba997
commit
3b28cff9c0
|
@ -1416,7 +1416,7 @@ struct cff1
|
||||||
}
|
}
|
||||||
|
|
||||||
gname_t key = { hb_bytes_t (name, len), 0 };
|
gname_t key = { hb_bytes_t (name, len), 0 };
|
||||||
const gname_t *gname = glyph_names->bsearch (key);
|
const gname_t *gname = names ? names->bsearch (key) : nullptr;
|
||||||
if (!gname) return false;
|
if (!gname) return false;
|
||||||
hb_codepoint_t gid = sid_to_glyph (gname->sid);
|
hb_codepoint_t gid = sid_to_glyph (gname->sid);
|
||||||
if (!gid && gname->sid) return false;
|
if (!gid && gname->sid) return false;
|
||||||
|
|
Loading…
Reference in New Issue