From f418346521fbd7d7fc5398fcb8ddeee77aac3cd8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 17 Jun 2010 16:00:01 +0100 Subject: [PATCH] doveadm: Another -A crashfix for mail commands that don't print anything. --HG-- branch : HEAD --- src/doveadm/doveadm-print.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doveadm/doveadm-print.c b/src/doveadm/doveadm-print.c index 3bf89852fe..47a0ec830f 100644 --- a/src/doveadm/doveadm-print.c +++ b/src/doveadm/doveadm-print.c @@ -87,6 +87,11 @@ void doveadm_print_sticky(const char *key, const char *value) { struct doveadm_print_header_context *hdr; + if (ctx == NULL) { + /* command doesn't really print anything */ + return; + } + array_foreach_modifiable(&ctx->headers, hdr) { if (strcmp(hdr->key, key) == 0) { i_free(hdr->sticky_value); -- 2.47.3