[var] Minor lifecycle adjustment
This commit is contained in:
parent
bf0d3a665b
commit
0dcc7b49a8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue