From: Behdad Esfahbod Date: Mon, 30 Jul 2012 14:06:42 +0000 (-0400) Subject: Don't lock user_data set during destruction if empty X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f4764bb56bb7e42ba8859f1905810bd2f998838;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Don't lock user_data set during destruction if empty --- diff --git a/src/hb-private.hh b/src/hb-private.hh index ea3254c..2f85025 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -442,6 +442,11 @@ struct hb_lockable_set_t inline void finish (lock_t &l) { + if (!items.len) { + /* No need for locking. */ + items.finish (); + return; + } l.lock (); while (items.len) { item_t old = items[items.len - 1];