From 35929a37e7428d8a04415a665e3b5b6369d9fd24 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 4 Sep 2009 17:39:59 -0400 Subject: Bug 594002 - Stuck mail activities when error occurs --- mail/mail-mt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 6c25d7ab8e..011697b76a 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -147,12 +147,12 @@ end_event_callback (CamelObject *o, EActivity *activity, gpointer error) shell = e_shell_get_default (); shell_backend = e_shell_get_backend_by_name (shell, "mail"); - if (error == NULL) { + if (activity != NULL) { e_activity_complete (activity); g_object_unref (activity); - } else { - if (activity != NULL) - g_object_unref (activity); + } + + if (error != NULL) { activity = e_alert_activity_new_warning (error); e_shell_backend_add_activity (shell_backend, activity); g_object_unref (activity); -- cgit