mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-16 18:24:56 +00:00
[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
1 changed files with 3 additions and 2 deletions
|
@ -379,9 +379,10 @@ hb_unicode_funcs_set_##name##_func (hb_unicode_funcs_t *ufuncs, \
|
|||
if (hb_object_is_immutable (ufuncs)) \
|
||||
goto fail; \
|
||||
\
|
||||
if (!func && destroy) \
|
||||
if (!func) \
|
||||
{ \
|
||||
destroy (user_data); \
|
||||
if (destroy) \
|
||||
destroy (user_data); \
|
||||
destroy = nullptr; \
|
||||
user_data = nullptr; \
|
||||
} \
|
||||
|
|
Loading…
Add table
Reference in a new issue