[ENOMEM] check for unset current in serializer->length().
This commit is contained in:
parent
0d22fb38b9
commit
4cbc7d61bc
|
@ -373,7 +373,11 @@ struct hb_serialize_context_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int length () const { return this->head - current->head; }
|
unsigned int length () const
|
||||||
|
{
|
||||||
|
if (unlikely (!current)) return 0;
|
||||||
|
return this->head - current->head;
|
||||||
|
}
|
||||||
|
|
||||||
void align (unsigned int alignment)
|
void align (unsigned int alignment)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue