[unicode] Destroy user_data in set_funcs fail paths
This is what the font_funcs / draw_funcs do.
This commit is contained in:
parent
527823ccac
commit
2d8ff3bcbe
|
@ -379,9 +379,10 @@ hb_unicode_funcs_set_##name##_func (hb_unicode_funcs_t *ufuncs, \
|
||||||
if (hb_object_is_immutable (ufuncs)) \
|
if (hb_object_is_immutable (ufuncs)) \
|
||||||
goto fail; \
|
goto fail; \
|
||||||
\
|
\
|
||||||
if (!func && destroy) \
|
if (!func) \
|
||||||
{ \
|
{ \
|
||||||
destroy (user_data); \
|
if (destroy) \
|
||||||
|
destroy (user_data); \
|
||||||
destroy = nullptr; \
|
destroy = nullptr; \
|
||||||
user_data = nullptr; \
|
user_data = nullptr; \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in New Issue