From: Carl Worth Date: Thu, 15 Oct 2009 00:09:56 +0000 (-0700) Subject: Avoid complaints about messages with empty mime parts. X-Git-Tag: 0.1~857 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=71bd250cb6200e9a89768e34562938f7fe409d4b;p=notmuch.git Avoid complaints about messages with empty mime parts. --- diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc index efc7eb14..0b1072d7 100644 --- a/notmuch-index-message.cc +++ b/notmuch-index-message.cc @@ -503,7 +503,8 @@ gen_terms_part (Xapian::TermGenerator term_gen, stream = g_mime_stream_mem_new_with_byte_array (byte_array); g_mime_stream_mem_set_owner (GMIME_STREAM_MEM (stream), FALSE); wrapper = g_mime_part_get_content_object (GMIME_PART (part)); - g_mime_data_wrapper_write_to_stream (wrapper, stream); + if (wrapper) + g_mime_data_wrapper_write_to_stream (wrapper, stream); g_object_unref (stream);