mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-12-01 10:34:23 +01:00
Destroy lookups before blobs.
'layout->gsub' may depend on data owned by 'layout->gsub_blob', so it must be deinitialized before the blob is destroyed.
This commit is contained in:
1 parent
79d1007a50
commit
89312b7417
1 file changed
+4
-4
+4
-4
@@ -82,10 +82,6 @@ _hb_ot_layout_create (hb_face_t *face)
|
||||
void
|
||||
_hb_ot_layout_destroy (hb_ot_layout_t *layout)
|
||||
{
|
||||
hb_blob_destroy (layout->gdef_blob);
|
||||
hb_blob_destroy (layout->gsub_blob);
|
||||
hb_blob_destroy (layout->gpos_blob);
|
||||
|
||||
for (unsigned int i = 0; i < layout->gsub_lookup_count; i++)
|
||||
layout->gsub_accels[i].fini (layout->gsub->get_lookup (i));
|
||||
for (unsigned int i = 0; i < layout->gpos_lookup_count; i++)
|
||||
@@ -94,6 +90,10 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
|
||||
free (layout->gsub_accels);
|
||||
free (layout->gpos_accels);
|
||||
|
||||
hb_blob_destroy (layout->gdef_blob);
|
||||
hb_blob_destroy (layout->gsub_blob);
|
||||
hb_blob_destroy (layout->gpos_blob);
|
||||
|
||||
free (layout);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user