From e3761b48d0bd9007229874d4f840a78219915a85 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Tue, 12 May 2009 11:41:08 -0400 Subject: [PATCH] Reset the factory instance pointer to NULL if it gets destroyed --- champlain/champlain-map-source-factory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c index 5b5271b..2bd84a3 100644 --- a/champlain/champlain-map-source-factory.c +++ b/champlain/champlain-map-source-factory.c @@ -29,7 +29,7 @@ * * To get the list of registered map sources, use * #champlain_map_source_factory_get_list. - * + * */ #include "config.h" @@ -228,6 +228,7 @@ champlain_map_source_factory_get_default (void) if (G_UNLIKELY (instance == NULL)) { instance = g_object_new (CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY, NULL); + g_object_add_weak_pointer (G_OBJECT (instance), (gpointer*)&instance); return instance; } -- 2.39.5