From 170423f924950728cec21a784787aa43b0be71bc Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 24 Sep 2009 10:44:17 +0200 Subject: [PATCH] Move setting the refcount to the end of the function This is a safety feature for when making it atomic later. https://bugzilla.gnome.org/show_bug.cgi?id=585375 --- gobject/gtype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobject/gtype.c b/gobject/gtype.c index cd33770..07ed622 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1127,7 +1127,6 @@ type_data_make_W (TypeNode *node, } node->data = data; - node->ref_count = 1; if (vtable_size) { @@ -1158,6 +1157,8 @@ type_data_make_W (TypeNode *node, GPOINTER_TO_UINT (type_get_qdata_L (node, static_quark_type_flags)))); g_assert (node->data->common.value_table != NULL); /* paranoid */ + + node->ref_count = 1; } static inline void -- 2.7.4