[evolution] Fix a runtime warning in e_mail_reader_check_state().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Fix a runtime warning in e_mail_reader_check_state().
- Date: Tue, 3 May 2011 15:15:59 +0000 (UTC)
commit 3bdba393f75bf3073d4b3e325fc4092dc1268ea9
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue May 3 10:54:56 2011 -0400
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 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 3cf8d1f..631fe57 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]