From c6e9d9fc39c368926b95be6763c9ae85f99e5172 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Wed, 19 Sep 2007 21:09:30 +0000 Subject: [PATCH] * src/modest-tny-msg.c: * (add_attachments): we don't add purged attachments to constructed messages (fixes NB#66088). pmo-trunk-r3357 --- src/modest-tny-msg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modest-tny-msg.c b/src/modest-tny-msg.c index 56fe1e1..36cfc47 100644 --- a/src/modest-tny-msg.c +++ b/src/modest-tny-msg.c @@ -267,9 +267,11 @@ add_attachments (TnyMsg *msg, GList *attachments_list) for (pos = (GList *)attachments_list; pos; pos = pos->next) { old_attachment = pos->data; - attachment_part = copy_mime_part (old_attachment); - tny_mime_part_add_part (TNY_MIME_PART (msg), attachment_part); - g_object_unref (attachment_part); + if (!tny_mime_part_is_purged (old_attachment)) { + attachment_part = copy_mime_part (old_attachment); + tny_mime_part_add_part (TNY_MIME_PART (msg), attachment_part); + g_object_unref (attachment_part); + } } } -- 1.7.9.5