[directwrite] Simplify delete

Fixes https://github.com/harfbuzz/harfbuzz/issues/3981
This commit is contained in:
Behdad Esfahbod 2022-12-27 14:38:17 -07:00
parent 7b0f9abc89
commit 326db329f8
1 changed files with 4 additions and 8 deletions

View File

@ -251,15 +251,11 @@ _hb_directwrite_shaper_face_data_destroy (hb_directwrite_face_data_t *data)
data->dwriteFactory->UnregisterFontFileLoader (data->fontFileLoader);
data->dwriteFactory->Release ();
}
if (data->fontFileLoader)
delete data->fontFileLoader;
if (data->fontFileStream)
delete data->fontFileStream;
if (data->faceBlob)
hb_blob_destroy (data->faceBlob);
if (data->dwrite_dll)
FreeLibrary (data->dwrite_dll);
if (data)
delete data;
}