From df077fadd7828b609bdfe4dbcad52ef2448525c7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 May 2011 01:19:39 -0400 Subject: [PATCH] [object] Make object inert during destruction Such that user_data and other finalizers cannot resurrect object --- src/hb-object-private.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index 08f4bb13f..90f227c55 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -170,6 +170,8 @@ struct _hb_object_header_t { if (ref_count.dec () != 1) return false; + ref_count.init (HB_REFERENCE_COUNT_INVALID_VALUE); + user_data.finish (); return true;