aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorLarry Ewing <lewing@helixcode.com>2000-10-11 08:14:21 +0800
committerLarry Ewing <lewing@src.gnome.org>2000-10-11 08:14:21 +0800
commit6d26494925d2875fed9739a55ec5d214f18fb972 (patch)
tree08039434ff0ce62ff629e9f6a4cf2e2c967e6a0c /mail/mail-format.c
parent0f0c7ec34e90bc0bd4b9fb465c86f8b9ef8ddef5 (diff)
downloadgsoc2013-evolution-6d26494925d2875fed9739a55ec5d214f18fb972.tar.gz
gsoc2013-evolution-6d26494925d2875fed9739a55ec5d214f18fb972.tar.zst
gsoc2013-evolution-6d26494925d2875fed9739a55ec5d214f18fb972.zip
make sure we dup the return value of get_reply_to or get_from when
2000-10-10 Larry Ewing <lewing@helixcode.com> * mail-format.c (mail_generate_reply): make sure we dup the return value of get_reply_to or get_from when building the recipient list. svn path=/trunk/; revision=5829
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 8d690a1c84..7c2991ab18 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1622,7 +1622,7 @@ EMsgComposer *
mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
{
CamelDataWrapper *contents;
- char *text, *subject;
+ char *text, *subject, *recipient;
EMsgComposer *composer;
gboolean want_plain, is_html;
const char *repl_to, *message_id, *references;
@@ -1694,7 +1694,9 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
repl_to = camel_mime_message_get_reply_to (message);
if (!repl_to)
repl_to = camel_mime_message_get_from (message);
- to = g_list_append (NULL, (gpointer)repl_to);
+
+ recipient = g_strdup (repl_to ? repl_to : "");
+ to = g_list_append (NULL, (gpointer)recipient);
if (to_all) {
const CamelInternetAddress *recip;