From 0dcc7b49a830e2680d3e6d86d953efab85cef6ff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 21 Jan 2017 14:50:22 -0800 Subject: [PATCH] [var] Minor lifecycle adjustment --- src/hb-font.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index a8b9e4c3b..e2a0a5f0f 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -1556,11 +1556,11 @@ hb_font_set_var_coords_normalized (hb_font_t *font, if (unlikely (coords_length && !copy)) return; - free (font->coords); - if (coords_length) memcpy (copy, coords, coords_length * sizeof (coords[0])); + free (font->coords); + font->coords = copy; font->num_coords = coords_length; }