From 6470ff989a939a65ae17ceb89cfca4e4de4afafc Mon Sep 17 00:00:00 2001 From: djcb Date: Wed, 12 Sep 2012 12:11:02 +0300 Subject: [PATCH] * mu-msg.c: return NULL rather than "" if there is no body (get_body) --- lib/mu-msg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/mu-msg.c b/lib/mu-msg.c index 7a0d7e2e..f619b058 100644 --- a/lib/mu-msg.c +++ b/lib/mu-msg.c @@ -491,7 +491,11 @@ get_body (MuMsg *self, MuMsgOptions opts, gboolean want_html) (MuMsgPartForeachFunc)accumulate_body, &bdata); - return g_string_free (bdata.gstr, FALSE); + if (bdata.gstr->len == 0) { + g_string_free (bdata.gstr, TRUE); + return NULL; + } else + return g_string_free (bdata.gstr, FALSE); } const char*