[cff1] Fix null dereference on memory alloc failure
This commit is contained in:
parent
8df9aba997
commit
3b28cff9c0
|
@ -1413,10 +1413,10 @@ struct cff1
|
|||
}
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
hb_codepoint_t gid = sid_to_glyph (gname->sid);
|
||||
if (!gid && gname->sid) return false;
|
||||
|
|
Loading…
Reference in New Issue