aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-08-28 05:21:14 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-08-28 05:21:14 +0800
commit68a8a866bb4036b6aea03d62634fc27a6fa4c4c4 (patch)
tree08904dce3d0022d904f5d8a1dab7df8629a878ef /mail/mail-callbacks.c
parent7c5fe3b52c54cf3223edbd2e5870cbc5795b1abc (diff)
downloadgsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar.gz
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar.bz2
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar.lz
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar.xz
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.tar.zst
gsoc2013-evolution-68a8a866bb4036b6aea03d62634fc27a6fa4c4c4.zip
Check if we are trying to reply to a message with no From: field, and try
2001-08-27 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c (mail_generate_reply): Check if we are trying to reply to a message with no From: field, and try to do something graceful in that case. (Bug #7028) * mail-display.c (ebook_callback): Add paranoid checks for the case of a message with a From: field. (Also maybe bug #7028) svn path=/trunk/; revision=12490
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index a99cde4317..8421921c56 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -660,7 +660,12 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
return NULL;
sender = camel_mime_message_get_from (message);
- camel_internet_address_get (sender, 0, &name, &address);
+ if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
+ camel_internet_address_get (sender, 0, &name, &address);
+ } else {
+ name = _("an unknown sender");
+ }
+
date = camel_mime_message_get_date (message, NULL);
strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),