aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-03-07 02:37:37 +0800
committerMilan Crha <mcrha@redhat.com>2013-03-07 02:38:19 +0800
commit0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8 (patch)
tree16a25ce6707e5a61b86bedc3386e8412be764227 /mail
parent989886007f3f69ca64e383ad6d64ef8c352f6df8 (diff)
downloadgsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.gz
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.zst
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.zip
Bug #690092 - Crash under format_full_headers()
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-printer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mail/e-mail-printer.c b/mail/e-mail-printer.c
index 4df136ebb8..475f49af8a 100644
--- a/mail/e-mail-printer.c
+++ b/mail/e-mail-printer.c
@@ -649,6 +649,7 @@ emp_set_parts_list (EMailPrinter *emp,
CamelMediumHeader *header;
CamelMimeMessage *message;
GArray *headers;
+ GQueue *headers_queue;
gint i;
GtkTreeIter last_known = { 0 };
@@ -667,6 +668,7 @@ emp_set_parts_list (EMailPrinter *emp,
if (!headers)
return;
+ headers_queue = e_mail_formatter_dup_headers (E_MAIL_FORMATTER (emp->priv->formatter));
for (i = 0; i < headers->len; i++) {
GtkTreeIter iter;
GList *found_header;
@@ -675,10 +677,7 @@ emp_set_parts_list (EMailPrinter *emp,
header = &g_array_index (headers, CamelMediumHeader, i);
emfh = e_mail_formatter_header_new (header->name, header->value);
- found_header = g_queue_find_custom (
- (GQueue *) e_mail_formatter_get_headers (
- E_MAIL_FORMATTER (emp->priv->formatter)),
- emfh, (GCompareFunc) emp_header_name_equal);
+ found_header = g_queue_find_custom (headers_queue, emfh, (GCompareFunc) emp_header_name_equal);
if (!found_header) {
emfh->flags |= E_MAIL_FORMATTER_HEADER_FLAG_HIDDEN;
@@ -702,6 +701,7 @@ emp_set_parts_list (EMailPrinter *emp,
COLUMN_HEADER_STRUCT, emfh, -1);
}
+ g_queue_free_full (headers_queue, (GDestroyNotify) e_mail_formatter_header_free);
camel_medium_free_headers (CAMEL_MEDIUM (message), headers);
}