* mu-cmd-find.c: don't try to summarize a NULL body
This commit is contained in:
@ -570,10 +570,17 @@ display_field (MuMsg *msg, MuMsgFieldId mfid)
|
|||||||
static void
|
static void
|
||||||
print_summary (MuMsg *msg, int summary_len)
|
print_summary (MuMsg *msg, int summary_len)
|
||||||
{
|
{
|
||||||
|
const char* body;
|
||||||
char *summ;
|
char *summ;
|
||||||
summ = mu_str_summarize (mu_msg_get_body_text(msg),
|
|
||||||
(unsigned)summary_len);
|
body = mu_msg_get_body_text(msg);
|
||||||
g_print ("Summary: %s\n", summ ? summ : "<none>");
|
|
||||||
|
summ = body ? mu_str_summarize (body, (unsigned)summary_len) : NULL;
|
||||||
|
|
||||||
|
g_print ("Summary: ");
|
||||||
|
mu_util_fputs_encoded (summ ? summ : "<none>", stdout);
|
||||||
|
g_print ("\n");
|
||||||
|
|
||||||
g_free (summ);
|
g_free (summ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user