diff --git a/src/hb-object.hh b/src/hb-object.hh index 8cbf7a8a9..bc37cc5ae 100644 --- a/src/hb-object.hh +++ b/src/hb-object.hh @@ -273,7 +273,8 @@ static inline bool hb_object_destroy (Type *obj) hb_object_fini (obj); - obj->~Type (); + if (!std::is_trivially_destructible::value) + obj->~Type (); return true; }