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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index a0c96889cf..60289e82f9 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2471,6 +2471,7 @@ mail_reader_message_seen_cb (EMailReaderClosure *closure)
EMailReader *reader;
GtkWidget *message_list;
EMFormatHTML *formatter;
+ CamelMimeMessage *message;
const gchar *current_uid;
const gchar *message_uid;
gboolean uid_is_current = TRUE;
@@ -2487,16 +2488,12 @@ mail_reader_message_seen_cb (EMailReaderClosure *closure)
current_uid = MESSAGE_LIST (message_list)->cursor_uid;
uid_is_current &= (g_strcmp0 (current_uid, message_uid) == 0);
- if (uid_is_current) {
- CamelMimeMessage *message;
-
- message = EM_FORMAT (formatter)->message;
- g_return_val_if_fail (message != NULL, FALSE);
+ message = EM_FORMAT (formatter)->message;
+ if (uid_is_current && message != NULL)
g_signal_emit (
reader, signals[MESSAGE_SEEN], 0,
message_uid, message);
- }
return FALSE;
}
@@ -2595,8 +2592,10 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
goto exit;
}
- g_signal_emit (
- reader, signals[MESSAGE_LOADED], 0, message_uid, message);
+ if (message != NULL)
+ g_signal_emit (
+ reader, signals[MESSAGE_LOADED], 0,
+ message_uid, message);
exit:
priv->restoring_message_selection = FALSE;