diff options
author | Milan Crha <mcrha@redhat.com> | 2011-06-28 00:25:12 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:34 +0800 |
commit | 76ee6f3e7fe18a6bc17276cbb58828d7834ccf80 (patch) | |
tree | 48a103d86084aa940988277791a638c57eb1575c /mail/em-format-html.c | |
parent | adc1173159d4d5d953340f8f3c813681007de524 (diff) | |
download | gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar.gz gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar.bz2 gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar.lz gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar.xz gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.tar.zst gsoc2013-evolution-76ee6f3e7fe18a6bc17276cbb58828d7834ccf80.zip |
Bug #653466 - Crash in efh_format_headers
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r-- | mail/em-format-html.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 5dd2440c5f..0e8d8d3df7 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -2796,7 +2796,7 @@ efh_format_headers (EMFormatHTML *efh, /* If the header is collapsed, display just subject and sender in one row and leave */ if (efh->priv->headers_state == EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED && efh->priv->headers_collapsable) { - gchar *subject = _("(no subject)"); + gchar *subject = NULL; struct _camel_header_address *addrs = NULL; GString *from = g_string_new (""); @@ -2817,6 +2817,7 @@ efh_format_headers (EMFormatHTML *efh, } else if (!g_ascii_strcasecmp (header->name, "Subject")) { gchar *buf = NULL; buf = camel_header_unfold (header->value); + g_free (subject); subject = camel_header_decode_string (buf, hdr_charset); g_free (buf); } @@ -2824,10 +2825,9 @@ efh_format_headers (EMFormatHTML *efh, } camel_stream_printf (stream, "<tr><td width=\"20\" valign=\"top\"><a href=\"##HEADERS##\"><img src=\"%s/plus.png\"></a></td><td><strong>%s</strong> %s%s%s</td></tr>", - evolution_imagesdir, subject, from->len ? "(" : "", from->str, from->len ? ")" : ""); + evolution_imagesdir, subject ? subject : _("(no subject)"), from->len ? "(" : "", from->str, from->len ? ")" : ""); g_free (subject); - g_free (header); if (addrs) camel_header_address_list_clear (&addrs); g_string_free (from, TRUE); |