[subset] fix nullptr deref.

This commit is contained in:
Garret Rieger 2021-03-29 16:08:44 -07:00
parent 9a3537e5f6
commit c6adb90a27
1 changed files with 12 additions and 10 deletions

View File

@ -107,9 +107,11 @@ struct hb_closure_context_t :
done_lookups_glyph_count->set (lookup_index, glyphs->get_population ());
if (!done_lookups_glyph_set->get (lookup_index))
{
done_lookups_glyph_set->set (lookup_index, hb_set_create ());
done_lookups_glyph_set->get (lookup_index)->clear ();
} else {
done_lookups_glyph_set->get (lookup_index)->clear ();
}
}
hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index);