[PATCH] Do not attept to output part raw if part is not GMimePart.
Jameson Graef Rollins
jrollins at finestructure.net
Fri Jun 3 10:01:06 PDT 2011
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.
---
This is a cleaner version of this patch.
notmuch-show.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/notmuch-show.c b/notmuch-show.c
index 9267d02..59f7078 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -644,6 +644,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;
--
1.7.4.4
More information about the notmuch
mailing list