diff options
Diffstat (limited to 'camel/camel-simple-data-wrapper.c')
-rw-r--r-- | camel/camel-simple-data-wrapper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/camel/camel-simple-data-wrapper.c b/camel/camel-simple-data-wrapper.c index a1822e8bcf..2b603d5ef3 100644 --- a/camel/camel-simple-data-wrapper.c +++ b/camel/camel-simple-data-wrapper.c @@ -138,12 +138,14 @@ my_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) g_assert (data_wrapper); g_assert (stream); - g_assert (simple_data_wrapper->byte_array); + array = simple_data_wrapper->byte_array; - if (array->len) + if ( array && array->len) camel_stream_write (stream, (gchar *)array->data, array->len); + else + parent_class->write_to_stream (data_wrapper, stream); - CAMEL_LOG_FULL_DEBUG ("CamelSimpleDataWrapper:: Leaving my_write_to_stream\n"); + CAMEL_LOG_FULL_DEBUG ("CamelSimpleDataWrapper:: Leaving my_write_to_stream\n"); } |