From 5da829eaf534b78ee2fee7fbea86e8deb36bfef3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 28 Jan 2023 22:18:53 -0700 Subject: [PATCH] [font] Comments --- src/hb-ot-font.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 36575cf54..e03339d85 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -85,6 +85,7 @@ _hb_ot_font_create (hb_font_t *font) ot_font->ot_face = &font->face->table; + // retry: auto *cmap_cache = (hb_ot_font_cmap_cache_t *) hb_face_get_user_data (font->face, &hb_ot_font_cmap_cache_user_data_key); if (!cmap_cache) @@ -98,13 +99,14 @@ _hb_ot_font_create (hb_font_t *font) hb_free, false))) { - /* Normally we would retry after this, but that would + hb_free (cmap_cache); + cmap_cache = nullptr; + /* Normally we would retry here, but that would * infinite-loop if the face is the empty-face. * Just let it go and this font will be uncached if it * happened to collide with another thread creating the * cache at the same time. */ - hb_free (cmap_cache); - cmap_cache = nullptr; + // goto retry; } } out: