notmuch reply: Avoid segmentation fault when printing multiple parts

The code was previously trying to print a NULL string in this case, which
is obviously what we don't want to do.
This commit is contained in:
Carl Worth 2011-05-24 10:52:38 -07:00
parent 916c2aa624
commit b825bce61d

View file

@ -46,7 +46,7 @@ show_message_part (GMimeObject *part,
selected = (params->part <= 0 || state->part_count == params->part);
if (selected || state->in_zone) {
if (!first && (params->part <= 0 || state->in_zone))
if (!first && (params->part <= 0 || state->in_zone) && format->part_sep)
fputs (format->part_sep, stdout);
format->part (part, &(state->part_count));