From: Jose Dapena Paz Date: Fri, 24 Jul 2009 12:18:05 +0000 (+0200) Subject: Finalize plugin factory after protocol registry, and not the opposite. X-Git-Tag: 3.0.17-rc25~3 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=2d054bb7d85614c1b2afb7614ba6cf2e8d5cb465 Finalize plugin factory after protocol registry, and not the opposite. * src/modest-singletons.c (modest_singletons_finalize): unref the plugin factory before the protocol registry (fixes NB#128962). --- diff --git a/src/modest-singletons.c b/src/modest-singletons.c index 76f6ec1..ca28aeb 100644 --- a/src/modest-singletons.c +++ b/src/modest-singletons.c @@ -242,18 +242,18 @@ modest_singletons_finalize (GObject *obj) priv->email_clipboard = NULL; } - if (priv->plugin_factory) { - MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->plugin_factory,""); - g_object_unref (G_OBJECT(priv->plugin_factory)); - priv->plugin_factory = NULL; - } - if (priv->protocol_registry) { MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->protocol_registry,""); g_object_unref (G_OBJECT(priv->protocol_registry)); priv->protocol_registry = NULL; } + if (priv->plugin_factory) { + MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->plugin_factory,""); + g_object_unref (G_OBJECT(priv->plugin_factory)); + priv->plugin_factory = NULL; + } + /* It is important that the account manager is uninitialized after * the mail op queue is uninitialized because the mail op queue * cancells any mail operations which in turn access the account