[ENOMEM] skip asserts in to_bias if serializer is in an error state.

This commit is contained in:
Garret Rieger 2020-08-11 15:40:47 -07:00 committed by ebraminio
parent 057769b1a3
commit 6f754852c1
2 changed files with 1 additions and 0 deletions

View File

@ -332,6 +332,7 @@ struct hb_serialize_context_t
unsigned to_bias (const void *base) const
{
if (unlikely (in_error ())) return 0;
if (!base) return 0;
assert (current);
assert (current->head <= (const char *) base);