[var] Minor lifecycle adjustment

pull/407/head
Behdad Esfahbod 8 years ago
parent bf0d3a665b
commit 0dcc7b49a8
  1. 4
      src/hb-font.cc

@ -1556,11 +1556,11 @@ hb_font_set_var_coords_normalized (hb_font_t *font,
if (unlikely (coords_length && !copy)) if (unlikely (coords_length && !copy))
return; return;
free (font->coords);
if (coords_length) if (coords_length)
memcpy (copy, coords, coords_length * sizeof (coords[0])); memcpy (copy, coords, coords_length * sizeof (coords[0]));
free (font->coords);
font->coords = copy; font->coords = copy;
font->num_coords = coords_length; font->num_coords = coords_length;
} }

Loading…
Cancel
Save