mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 10:04:24 +01:00
[ENOMEM] check for unset current in serializer->length().
This commit is contained in:
1 parent
0d22fb38b9
commit
4cbc7d61bc
1 file changed
+5
-1
+5
-1
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user