[ft] Do not deference ft_font if it is nullptr (#2502)

This commit is contained in:
Sebastian Rasmussen 2020-06-28 11:18:16 +08:00 committed by GitHub
parent a373e16131
commit 2267da4ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -832,6 +832,10 @@ hb_ft_font_changed (hb_font_t *font)
return;
hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data;
if (unlikely (!ft_font))
return;
FT_Face ft_face = ft_font->ft_face;
hb_font_set_scale (font,