[ft] Handle nullptr when destroying freetype font (#2494)
This commit is contained in:
parent
20d1fa3671
commit
dbf9896e7a
|
@ -120,6 +120,9 @@ _hb_ft_font_destroy (void *data)
|
||||||
{
|
{
|
||||||
hb_ft_font_t *ft_font = (hb_ft_font_t *) data;
|
hb_ft_font_t *ft_font = (hb_ft_font_t *) data;
|
||||||
|
|
||||||
|
if (unlikely (!ft_font))
|
||||||
|
return;
|
||||||
|
|
||||||
ft_font->advance_cache.fini ();
|
ft_font->advance_cache.fini ();
|
||||||
|
|
||||||
if (ft_font->unref)
|
if (ft_font->unref)
|
||||||
|
|
Loading…
Reference in New Issue