[buffer] Fix immutable case with end_ptr==nullptr

This commit is contained in:
Behdad Esfahbod 2020-10-09 17:55:21 -06:00
parent 7c0bc0bb92
commit 3b64122a7f
1 changed files with 4 additions and 2 deletions

View File

@ -748,7 +748,8 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer,
if (unlikely (hb_object_is_immutable (buffer)))
{
*end_ptr = buf;
if (end_ptr)
*end_ptr = buf;
return false;
}
@ -818,7 +819,8 @@ hb_buffer_deserialize_unicode (hb_buffer_t *buffer,
if (unlikely (hb_object_is_immutable (buffer)))
{
*end_ptr = buf;
if (end_ptr)
*end_ptr = buf;
return false;
}