From cdf1cb35db2e479d40e629e355a9de348ab1c17c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 7 Feb 2022 19:05:52 -0600 Subject: [PATCH] [draw] Destroy callback data --- src/hb-draw.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-draw.cc b/src/hb-draw.cc index c442256ec..5a43396d9 100644 --- a/src/hb-draw.cc +++ b/src/hb-draw.cc @@ -157,6 +157,12 @@ hb_draw_funcs_destroy (hb_draw_funcs_t *dfuncs) { if (!hb_object_destroy (dfuncs)) return; +#define HB_DRAW_FUNC_IMPLEMENT(name) \ + if (dfuncs->destroy.name) dfuncs->destroy.name (dfuncs->user_data.name); + HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_DRAW_FUNC_IMPLEMENT + + hb_free (dfuncs); }