diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 22:54:56 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:06 +0800 |
commit | 9beae6f09e3306e471daf50d1bccc33fd15b3847 (patch) | |
tree | 14b22524285a8e696d61c40395c759a19ec94cb2 /mail | |
parent | c7398b967e885e3f0e371ff197a53bc8f7b974db (diff) | |
download | gsoc2013-evolution-9beae6f09e3306e471daf50d1bccc33fd15b3847.tar.gz gsoc2013-evolution-9beae6f09e3306e471daf50d1bccc33fd15b3847.tar.zst gsoc2013-evolution-9beae6f09e3306e471daf50d1bccc33fd15b3847.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.c | 12 |
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); |