aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 7260dcd47e..697142aa6d 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -1941,9 +1941,10 @@ mail_reader_set_folder (EMailReader *reader,
html_display = e_mail_reader_get_html_display (reader);
message_list = e_mail_reader_get_message_list (reader);
- outgoing = em_utils_folder_is_drafts (folder, folder_uri) ||
+ outgoing = folder != NULL && folder_uri != NULL && (
+ em_utils_folder_is_drafts (folder, folder_uri) ||
em_utils_folder_is_outbox (folder, folder_uri) ||
- em_utils_folder_is_sent (folder, folder_uri);
+ em_utils_folder_is_sent (folder, folder_uri));
if (message_list->folder != NULL)
mail_sync_folder (message_list->folder, NULL, NULL);
@@ -2232,8 +2233,6 @@ e_mail_reader_set_folder (EMailReader *reader,
EMailReaderIface *iface;
g_return_if_fail (E_IS_MAIL_READER (reader));
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (folder_uri != NULL);
iface = E_MAIL_READER_GET_IFACE (reader);
g_return_if_fail (iface->set_folder != NULL);