diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index e79b45ae4..eb7b01caa 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -216,7 +216,7 @@ hb_buffer_t::reset (void) return; hb_unicode_funcs_destroy (unicode); - unicode = hb_unicode_funcs_get_default (); + unicode = hb_unicode_funcs_reference (hb_unicode_funcs_get_default ()); flags = HB_BUFFER_FLAG_DEFAULT; replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; @@ -908,7 +908,6 @@ hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, if (!unicode_funcs) unicode_funcs = hb_unicode_funcs_get_default (); - hb_unicode_funcs_reference (unicode_funcs); hb_unicode_funcs_destroy (buffer->unicode); buffer->unicode = unicode_funcs; diff --git a/src/hb-glib.cc b/src/hb-glib.cc index 342891d98..809b22f6b 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -401,7 +401,7 @@ void free_static_glib_funcs (void) hb_unicode_funcs_t * hb_glib_get_unicode_funcs (void) { - return hb_unicode_funcs_reference (static_glib_funcs.get_unconst ()); + return static_glib_funcs.get_unconst (); } diff --git a/src/hb-icu.cc b/src/hb-icu.cc index 380a99c89..63b37f055 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -390,5 +390,5 @@ void free_static_icu_funcs (void) hb_unicode_funcs_t * hb_icu_get_unicode_funcs (void) { - return hb_unicode_funcs_reference (static_icu_funcs.get_unconst ()); + return static_icu_funcs.get_unconst (); } diff --git a/src/hb-ucdn.cc b/src/hb-ucdn.cc index 7b26e5124..56d13e7cd 100644 --- a/src/hb-ucdn.cc +++ b/src/hb-ucdn.cc @@ -275,5 +275,5 @@ extern "C" HB_INTERNAL hb_unicode_funcs_t * hb_ucdn_get_unicode_funcs (void) { - return hb_unicode_funcs_reference (static_ucdn_funcs.get_unconst ()); + return static_ucdn_funcs.get_unconst (); }