[face] Return nil face if blob is inert
This commit is contained in:
parent
e87867cb88
commit
1ab1d3e38c
|
@ -379,6 +379,9 @@ hb_face_t *
|
||||||
hb_face_create_for_data (hb_blob_t *blob,
|
hb_face_create_for_data (hb_blob_t *blob,
|
||||||
unsigned int index)
|
unsigned int index)
|
||||||
{
|
{
|
||||||
|
if (unlikely (hb_object_is_inert (blob)))
|
||||||
|
return &_hb_face_nil;
|
||||||
|
|
||||||
hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (Sanitizer<OpenTypeFontFile>::sanitize (hb_blob_reference (blob)), index);
|
hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (Sanitizer<OpenTypeFontFile>::sanitize (hb_blob_reference (blob)), index);
|
||||||
|
|
||||||
if (unlikely (!closure))
|
if (unlikely (!closure))
|
||||||
|
|
Loading…
Reference in New Issue