mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 17:01:17 +01:00
[unicode] Destroy user_data in set_funcs fail paths
This is what the font_funcs / draw_funcs do.
This commit is contained in:
1 parent
527823ccac
commit
2d8ff3bcbe
1 file changed
+3
-2
+3
-2
@@ -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; \
|
||||
} \
|
||||
|
||||
Reference in new issue
Block a user