From b58bfd9818243fc1178ecad0731fa24a5aa3f235 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 16 May 2022 11:21:45 -0600 Subject: [PATCH] [font] Minor move of code to silence gcc-12 warning See mailing list discussion. --- src/hb-font.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index db05f017a..5700e0627 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -2596,12 +2596,14 @@ hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, return; } + /* Since we pass it to two destroying functions. */ + trampoline_reference (&trampoline->closure); + hb_font_funcs_set_nominal_glyph_func (ffuncs, hb_font_get_nominal_glyph_trampoline, trampoline, trampoline_destroy); - trampoline_reference (&trampoline->closure); hb_font_funcs_set_variation_glyph_func (ffuncs, hb_font_get_variation_glyph_trampoline, trampoline,