diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-29 13:52:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-29 13:58:28 +0800 |
commit | f325283cc3c8360d4ec2e191a579ecb238501c23 (patch) | |
tree | 186ef5a482c9bd5d3f9797027c5d5f9348f44fc6 | |
parent | 59f15906a2dfc2bafd502d5b118c662a7b74bd8c (diff) | |
download | gsoc2013-evolution-f325283cc3c8360d4ec2e191a579ecb238501c23.tar.gz gsoc2013-evolution-f325283cc3c8360d4ec2e191a579ecb238501c23.tar.zst gsoc2013-evolution-f325283cc3c8360d4ec2e191a579ecb238501c23.zip |
Avoid a runtime warning in mail_reader_message_seen_cb().
-rw-r--r-- | mail/e-mail-reader.c | 10 |
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; } |