[blob] Allow null parent in create_sub_blob()

Like font and unicode.
This commit is contained in:
Behdad Esfahbod 2018-11-03 15:49:37 -04:00
parent fb0f30f55a
commit da408fce98
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ hb_blob_create_sub_blob (hb_blob_t *parent,
{
hb_blob_t *blob;
if (!length || offset >= parent->length)
if (!length || !parent || offset >= parent->length)
return hb_blob_get_empty ();
hb_blob_make_immutable (parent);