diff options
Diffstat (limited to 'em-format/e-mail-formatter-headers.c')
-rw-r--r-- | em-format/e-mail-formatter-headers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/em-format/e-mail-formatter-headers.c b/em-format/e-mail-formatter-headers.c index afe780a4ee..39aceb30c7 100644 --- a/em-format/e-mail-formatter-headers.c +++ b/em-format/e-mail-formatter-headers.c @@ -532,6 +532,7 @@ emfe_headers_format (EMailFormatterExtension *extension, CamelStream *stream, GCancellable *cancellable) { + CamelMimePart *mime_part; GString *buffer; const GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 }; const GdkRGBA *body_rgba = &white; @@ -543,7 +544,8 @@ emfe_headers_format (EMailFormatterExtension *extension, if (g_cancellable_is_cancelled (cancellable)) return FALSE; - if (!part->part) + mime_part = e_mail_part_ref_mime_part (part); + if (mime_part == NULL) return FALSE; switch (gtk_widget_get_default_direction ()) { @@ -599,13 +601,13 @@ emfe_headers_format (EMailFormatterExtension *extension, if (is_collapsable) format_short_headers ( formatter, buffer, - CAMEL_MEDIUM (part->part), + CAMEL_MEDIUM (mime_part), context->flags, cancellable); format_full_headers ( formatter, buffer, - CAMEL_MEDIUM (part->part), + CAMEL_MEDIUM (mime_part), context->mode, context->flags, cancellable); @@ -618,6 +620,8 @@ emfe_headers_format (EMailFormatterExtension *extension, g_string_free (buffer, TRUE); + g_object_unref (mime_part); + return TRUE; } |