diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-30 05:20:09 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-30 08:49:01 +0800 |
commit | 5f9af14a19899dd4350dd32409d43017ccd31f53 (patch) | |
tree | 14654ae7ccca9ba867ce0d2c2aa6dd2e5e1b3083 | |
parent | 91362202055688081b02f254a7c919a365864e4e (diff) | |
download | gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar.gz gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar.bz2 gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar.lz gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar.xz gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.tar.zst gsoc2013-evolution-5f9af14a19899dd4350dd32409d43017ccd31f53.zip |
EMailReader: Avoid more runtime warnings.
-rw-r--r-- | mail/e-mail-reader.c | 15 |
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; |