[subset-input] Fix destruction

Ouch! Object was already destroyed at that point before.
This commit is contained in:
Behdad Esfahbod 2023-01-12 12:09:14 -07:00
parent c60c5995bb
commit ef005bc82a
3 changed files with 11 additions and 11 deletions

View File

@ -241,14 +241,6 @@ hb_subset_input_destroy (hb_subset_input_t *input)
{
if (!hb_object_destroy (input)) return;
for (hb_set_t* set : input->sets_iter ())
hb_set_destroy (set);
#ifdef HB_EXPERIMENTAL_API
for (auto _ : input->name_table_overrides)
_.second.fini ();
#endif
hb_free (input);
}

View File

@ -82,6 +82,17 @@ HB_MARK_AS_FLAG_T (hb_subset_flags_t);
struct hb_subset_input_t
{
~hb_subset_input_t ()
{
for (hb_set_t* set : sets_iter ())
hb_set_destroy (set);
#ifdef HB_EXPERIMENTAL_API
for (auto _ : name_table_overrides)
_.second.fini ();
#endif
}
hb_object_header_t header;
struct sets_t {

View File

@ -43,9 +43,6 @@ struct Feature;
struct hb_subset_plan_t
{
hb_subset_plan_t ()
{}
~hb_subset_plan_t()
{
hb_face_destroy (source);