From f325283cc3c8360d4ec2e191a579ecb238501c23 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 28 Nov 2011 23:52:39 -0600 Subject: Avoid a runtime warning in mail_reader_message_seen_cb(). --- mail/e-mail-reader.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mail') 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; } -- cgit