From 0eb82133c519e7cc08ee6de2daef449581e4f9d6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 16 Dec 2006 04:28:43 +0000 Subject: Fri Dec 15 2006 Matthias Clasen * gtype.c (instance_real_class_get): Dereference the pointer before dropping the lock. (#378078, Jonathan Matthew) --- gobject/gtype.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gobject/gtype.c') diff --git a/gobject/gtype.c b/gobject/gtype.c index 12ce66fe8..44620db6c 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1511,11 +1511,13 @@ static inline GTypeClass* instance_real_class_get (gpointer instance) { InstanceRealClass key, *node; + GTypeClass *class; key.instance = instance; G_LOCK (instance_real_class); node = instance_real_class_bsa ? g_bsearch_array_lookup (instance_real_class_bsa, &instance_real_class_bconfig, &key) : NULL; + class = node ? node->class : NULL; G_UNLOCK (instance_real_class); - return node ? node->class : NULL; + return class; } GTypeInstance* -- cgit v1.2.3