From: Pierre-Luc Beaudoin Date: Tue, 12 May 2009 15:41:08 +0000 (-0400) Subject: Reset the factory instance pointer to NULL if it gets destroyed X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3761b48d0bd9007229874d4f840a78219915a85;p=libchamplain Reset the factory instance pointer to NULL if it gets destroyed --- 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; }