aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-01-11 17:36:22 +0800
committerMilan Crha <mcrha@redhat.com>2011-01-11 17:36:22 +0800
commit9f76afb18d5432c457d066245d90a49283f16299 (patch)
tree55d48305d2091ab1f7ce72a31f301e5d9144f7d7
parenta6d25b06d66576082a5756c9b2ed13fadce88f56 (diff)
downloadgsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar.gz
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar.bz2
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar.lz
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar.xz
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.tar.zst
gsoc2013-evolution-9f76afb18d5432c457d066245d90a49283f16299.zip
Bug #638808 - camel_shutdown() called too early
-rw-r--r--mail/e-mail-backend.c11
-rw-r--r--shell/e-shell.c1
2 files changed, 11 insertions, 1 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5b5c8d0bab..a49d3ede3a 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -202,7 +202,6 @@ mail_backend_poll_to_quit (EActivity *activity)
static void
mail_backend_ready_to_quit (EActivity *activity)
{
- mail_session_shutdown ();
emu_free_mail_cache ();
/* Do this last. It may terminate the process. */
@@ -380,6 +379,15 @@ mail_backend_idle_cb (EShellBackend *shell_backend)
}
static void
+mail_backend_finalize (GObject *object)
+{
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+
+ mail_session_shutdown ();
+}
+
+static void
mail_backend_constructed (GObject *object)
{
EShell *shell;
@@ -447,6 +455,7 @@ mail_backend_class_init (EMailBackendClass *class)
g_type_class_add_private (class, sizeof (EMailBackendPrivate));
object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = mail_backend_finalize;
object_class->constructed = mail_backend_constructed;
shell_backend_class = E_SHELL_BACKEND_CLASS (class);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 93832ec7fe..a168e21081 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -661,6 +661,7 @@ shell_finalize (GObject *object)
if (!unique_app_is_running (UNIQUE_APP (object)))
e_file_lock_destroy ();
+ g_list_foreach (priv->loaded_backends, (GFunc) g_object_unref, NULL);
g_list_free (priv->loaded_backends);
g_free (priv->geometry);