From 3bdba393f75bf3073d4b3e325fc4092dc1268ea9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 3 May 2011 10:54:56 -0400 Subject: Fix a runtime warning in e_mail_reader_check_state(). Don't call em_utils_folder_is_drafts() or em_utils_folder_is_outbox() if the CamelFolder is NULL. --- mail/e-mail-reader.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 3cf8d1f1ef..631fe5789a 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -3783,7 +3783,7 @@ e_mail_reader_check_state (EMailReader *reader) gboolean has_undeleted = FALSE; gboolean has_unimportant = FALSE; gboolean has_unread = FALSE; - gboolean drafts_or_outbox; + gboolean drafts_or_outbox = FALSE; gboolean store_supports_vjunk = FALSE; gboolean is_mailing_list; gboolean is_junk_folder = FALSE; @@ -3798,13 +3798,13 @@ e_mail_reader_check_state (EMailReader *reader) if (folder != NULL) { store = camel_folder_get_parent_store (folder); store_supports_vjunk = (store->flags & CAMEL_STORE_VJUNK); - is_junk_folder = (folder->folder_flags & CAMEL_FOLDER_IS_JUNK) != 0; + is_junk_folder = + (folder->folder_flags & CAMEL_FOLDER_IS_JUNK) != 0; + drafts_or_outbox = + em_utils_folder_is_drafts (folder) || + em_utils_folder_is_outbox (folder); } - drafts_or_outbox = - em_utils_folder_is_drafts (folder) || - em_utils_folder_is_outbox (folder); - /* Initialize this flag based on whether there are any * messages selected. We will update it in the loop. */ is_mailing_list = (uids->len > 0); -- cgit