aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 22:54:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-03 22:57:24 +0800
commit3bdba393f75bf3073d4b3e325fc4092dc1268ea9 (patch)
treed9b37821e54a92eeeff342723ab1c0946d5e1504 /mail
parentb8a932ae1e8b10344525ae2a5a78894e98ac2540 (diff)
downloadgsoc2013-evolution-3bdba393f75bf3073d4b3e325fc4092dc1268ea9.tar.gz
gsoc2013-evolution-3bdba393f75bf3073d4b3e325fc4092dc1268ea9.tar.zst
gsoc2013-evolution-3bdba393f75bf3073d4b3e325fc4092dc1268ea9.zip
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.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-reader.c12
1 files 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);