* mu-msg.c: return NULL rather than "" if there is no body (get_body)

This commit is contained in:
djcb 2012-09-12 12:11:02 +03:00
parent 8109410c58
commit 6470ff989a
1 changed files with 5 additions and 1 deletions

View File

@ -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*