aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-01-11 17:33:03 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:17 +0800
commit642b32cbdb197c238080048c8d9c87c284bcbfc7 (patch)
treef5a4b86a6fbfd7b95197deb67e0f59cf54e2c090
parentd4e5b79b43f634497c18b4903fb6fb839f8851e3 (diff)
downloadgsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar.gz
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar.bz2
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar.lz
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar.xz
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.tar.zst
gsoc2013-evolution-642b32cbdb197c238080048c8d9c87c284bcbfc7.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 740cf8526e..3ab7cbda8d 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -226,7 +226,6 @@ mail_backend_poll_to_quit (EActivity *activity)
static void
mail_backend_ready_to_quit (EActivity *activity)
{
- camel_shutdown ();
emu_free_mail_cache ();
/* Do this last. It may terminate the process. */
@@ -429,6 +428,15 @@ mail_backend_dispose (GObject *object)
}
static void
+mail_backend_finalize (GObject *object)
+{
+ if (G_OBJECT_CLASS (e_mail_backend_parent_class)->finalize)
+ G_OBJECT_CLASS (e_mail_backend_parent_class)->finalize (object);
+
+ camel_shutdown ();
+}
+
+static void
mail_backend_constructed (GObject *object)
{
EMailBackendPrivate *priv;
@@ -515,6 +523,7 @@ e_mail_backend_class_init (EMailBackendClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->get_property = mail_backend_get_property;
object_class->dispose = mail_backend_dispose;
+ 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 b1891ce3b8..123a9751e7 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -691,6 +691,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);