aboutsummaryrefslogtreecommitdiff
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2011-06-03 10:01:06 -0700
committerDavid Bremner <bremner@debian.org>2011-09-07 18:41:38 -0300
commita6b93ef32b3274f0ae51acc336500a439371d0fc (patch)
tree7583b41b5a6eb668bfc9d0108b9356cc749f2223 /notmuch-show.c
parent6979b6533abb4b3c76126152afd3d196514215da (diff)
Do not attempt to output part raw if part is not GMimePart.
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.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index dbb1efb..912999e 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -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;