diff options
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index d37b4c2fae..21deb4c5f9 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -488,8 +488,16 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) if (mp->headers) { struct _header_raw *h = mp->headers; + while (h) { - count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(h->value[0]) ? ":" : ": ", h->value); + if (h->value == NULL){ + g_warning ("h->value is NULL here for %s", h->name); + count = 0; + } else { + count = camel_stream_printf( + stream, "%s%s%s\n", h->name, + isspace(h->value[0]) ? ":" : ": ", h->value); + } if (count == -1) return -1; total += count; |