aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-11 00:04:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-11 00:04:07 +0800
commit6130dbd266d1c654bdc0f9be77e8694d2d22c95f (patch)
treee819186aeb19be3138ca0ce5bb631fee2c019474
parentebc2413c5c4350651a7753a31c2cf1b70f297ce5 (diff)
downloadgsoc2013-evolution-6130dbd266d1c654bdc0f9be77e8694d2d22c95f.tar.gz
gsoc2013-evolution-6130dbd266d1c654bdc0f9be77e8694d2d22c95f.tar.zst
gsoc2013-evolution-6130dbd266d1c654bdc0f9be77e8694d2d22c95f.zip
Make sure that the reply-to addr i non-NULL before trying to add it to the
2001-07-10 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (mail_generate_reply): Make sure that the reply-to addr i non-NULL before trying to add it to the hash table. svn path=/trunk/; revision=10953
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d7921ae553..61bdbcd0f6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-callbacks.c (mail_generate_reply): Make sure that the
+ reply-to addr i non-NULL before trying to add it to the hash
+ table.
+
2001-07-09 JP Rosevear <jpr@ximian.com>
* mail-account-gui.c (get_focused_widget): fix typo so it compiles
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 33b7c2ee30..899daf6b4f 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -699,7 +699,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
}
} else {
GHashTable *rcpt_hash;
-
+
rcpt_hash = g_hash_table_new (g_str_hash, g_str_equal);
reply_to = camel_mime_message_get_reply_to (message);
@@ -707,10 +707,10 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
reply_to = camel_mime_message_get_from (message);
if (reply_to) {
/* Get the Reply-To address so we can ignore references to it in the Cc: list */
- camel_internet_address_get (reply_to, 0, NULL, &reply_addr);
-
- g_hash_table_insert (rcpt_hash, (char *) reply_addr, GINT_TO_POINTER (1));
- to = g_list_append (to, camel_address_format (CAMEL_ADDRESS (reply_to)));
+ if (camel_internet_address_get (reply_to, 0, NULL, &reply_addr)) {
+ g_hash_table_insert (rcpt_hash, (char *) reply_addr, GINT_TO_POINTER (1));
+ to = g_list_append (to, camel_address_format (CAMEL_ADDRESS (reply_to)));
+ }
}
to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);