aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-reader.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 27af0d2b4b..a0c96889cf 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2471,7 +2471,6 @@ 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;
@@ -2488,13 +2487,16 @@ 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);
- message = EM_FORMAT (formatter)->message;
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), FALSE);
+ if (uid_is_current) {
+ CamelMimeMessage *message;
+
+ message = EM_FORMAT (formatter)->message;
+ g_return_val_if_fail (message != NULL, FALSE);
- if (uid_is_current)
g_signal_emit (
reader, signals[MESSAGE_SEEN], 0,
message_uid, message);
+ }
return FALSE;
}