aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@helixcode.com>2000-10-08 14:56:13 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2000-10-08 14:56:13 +0800
commit4f9326dff42b1001f35e704e4426cee01432bd18 (patch)
tree7b84d50d9af1f09f71dd3e11a6eb570120a21788
parent13e8c4071d8ee46e92f1cbfebc21602b9b100583 (diff)
downloadgsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar.gz
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar.bz2
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar.lz
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar.xz
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.tar.zst
gsoc2013-evolution-4f9326dff42b1001f35e704e4426cee01432bd18.zip
Issue a warning if h->value is NULL.
2000-10-08 Miguel de Icaza <miguel@helixcode.com> * camel-mime-part.c (write_to_stream): Issue a warning if h->value is NULL. svn path=/trunk/; revision=5785
-rw-r--r--camel/camel-mime-part.c10
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;