[subset-input] Fix destruction

Ouch! Object was already destroyed at that point before.
This commit is contained in:
Behdad Esfahbod committed 2023-01-12 12:09:50 -07:00
1 parent c60c5995bb
commit ef005bc82a
3 files changed
+11 -11

No files matched your search

-8
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);
}
+11
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 {
-3
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);