diff --git a/src/hb-map.hh b/src/hb-map.hh index a692b21e4..275dcbe93 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -211,9 +211,10 @@ struct hb_hashmap_t old_items[i].hash, std::move (old_items[i].value)); } - if (!item_t::is_trivial) - old_items[i].~item_t (); } + if (!item_t::is_trivial) + for (unsigned int i = 0; i < old_size; i++) + old_items[i].~item_t (); hb_free (old_items);