aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-object.c')
-rw-r--r--camel/camel-object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 703503b15b..ed8c255eaf 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -529,6 +529,10 @@ camel_object_unref (CamelObject * obj)
GINT_TO_POINTER (iter->parent));
}
+ /* ok, done with the type stuff, and our data pointers
+ * won't go bad. */
+ camel_type_lock_down ();
+
parents = g_slist_reverse (parents);
head = parents;
@@ -562,6 +566,8 @@ camel_object_unref (CamelObject * obj)
/* Tuck away the pointer for use in a new object */
+ camel_type_lock_up ();
+
type_info->free_instances =
g_list_prepend (type_info->free_instances, obj);