From: Behdad Esfahbod Date: Mon, 2 May 2011 23:53:39 +0000 (-0400) Subject: [object] Fix bug in get_user_data() implementation X-Git-Tag: 2.0_alpha~7^2~273 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1cd5969f253528b1fc05a06c7a9f222baa29f68d;p=apps%2Fcore%2Fpreloaded%2Fvideo-player.git [object] Fix bug in get_user_data() implementation --- diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index d124758..47cef7e 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -91,7 +91,8 @@ struct hb_user_data_array_t { } inline void *get (hb_user_data_key_t *key) { - return map.get (key); + hb_user_data_t *user_data = map.get (key); + return user_data ? user_data->data : NULL; } void finish (void) { map.finish (); } @@ -177,7 +178,7 @@ static inline void hb_object_trace (const Type *obj, const char *function) obj->header.trace (function); } template -static inline Type *hb_object_create () +static inline Type *hb_object_create (void) { Type *obj = (Type *) hb_object_header_t::create (sizeof (Type)); hb_object_trace (obj, HB_FUNC); @@ -186,7 +187,7 @@ static inline Type *hb_object_create () template static inline bool hb_object_is_inert (const Type *obj) { - return unlikely (obj->header.is_inert()); + return unlikely (obj->header.is_inert ()); } template static inline Type *hb_object_reference (Type *obj)