]> git.notmuchmail.org Git - notmuch/commitdiff
Do not attempt to output part raw if part is not GMimePart.
authorJameson Graef Rollins <jrollins@finestructure.net>
Fri, 3 Jun 2011 17:01:06 +0000 (10:01 -0700)
committerDavid Bremner <bremner@debian.org>
Wed, 7 Sep 2011 21:41:38 +0000 (18:41 -0300)
This was a minor oversite in checking of part type when outputing
content raw.  This was causing gmime was to throw an exception to
stderr.

Unfortunately the gmime exception was not being caught by notmuch, or
the test suite.  I'm not sure if notmuch should have done anything in
this case, but certainly the test suite should be capable of detecting
that something unexpected was output to stderr.

notmuch-show.c

index dbb1efb97f5954438d6d274f8bc5b7fb9cfb68c9..912999e1a65e645b7b893ac49d1df55ad197d51c 100644 (file)
@@ -708,6 +708,9 @@ format_part_end_json (GMimeObject *part)
 static void
 format_part_content_raw (GMimeObject *part)
 {
+    if (! GMIME_IS_PART (part))
+       return;
+
     GMimeStream *stream_stdout;
     GMimeStream *stream_filter = NULL;
     GMimeDataWrapper *wrapper;