[evolution] Bug 729241 - 'Mark all messages read' stuck after get_folder_info() failure



commit 49f198201008a2d6c95e50b6dd667ca414f4bded
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 10 12:43:47 2015 +0100

    Bug 729241 - 'Mark all messages read' stuck after get_folder_info() failure

 modules/mail/e-mail-shell-view-actions.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index f4829f2..5852101 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -632,7 +632,13 @@ mark_all_read_got_folder_info (GObject *source,
                return;
        }
 
-       g_return_if_fail (folder_info != NULL);
+       if (!folder_info) {
+               /* Otherwise the operation is stuck and the Evolution cannot be quit */
+               g_warn_if_fail (folder_info != NULL);
+               e_activity_set_state (context->activity, E_ACTIVITY_COMPLETED);
+               async_context_free (context);
+               return;
+       }
 
        response = mark_all_read_prompt_user (
                context->mail_shell_view,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]