[subset] check for set insertion success.

This commit is contained in:
Garret Rieger 2021-03-29 16:17:27 -07:00
parent c6adb90a27
commit 52df6b9fd8
1 changed files with 8 additions and 3 deletions

View File

@ -108,10 +108,15 @@ struct hb_closure_context_t :
if (!done_lookups_glyph_set->get (lookup_index)) if (!done_lookups_glyph_set->get (lookup_index))
{ {
done_lookups_glyph_set->set (lookup_index, hb_set_create ()); hb_set_t* empty_set = hb_set_create ();
} else { done_lookups_glyph_set->set (lookup_index, empty_set);
done_lookups_glyph_set->get (lookup_index)->clear (); if (!done_lookups_glyph_set->get (lookup_index)) {
hb_set_destroy (empty_set);
return true;
}
} }
done_lookups_glyph_set->get (lookup_index)->clear ();
} }
hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index); hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index);