]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm -A: Crashfix for doveadm server when using commands that print nothing.
authorTimo Sirainen <tss@iki.fi>
Fri, 3 Jun 2011 12:27:21 +0000 (15:27 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 3 Jun 2011 12:27:21 +0000 (15:27 +0300)
src/doveadm/doveadm-print.c

index 7dc0d5d7d0a39039b5f5988ddf54eb9abcadd6ca..d3107a52f298f0f84d7bfc58b95e363e221a8b45 100644 (file)
@@ -117,8 +117,10 @@ void doveadm_print_unstick_headers(void)
 {
        struct doveadm_print_header_context *hdr;
 
-       array_foreach_modifiable(&ctx->headers, hdr)
-               hdr->sticky = FALSE;
+       if (ctx != NULL) {
+               array_foreach_modifiable(&ctx->headers, hdr)
+                       hdr->sticky = FALSE;
+       }
 }
 
 void doveadm_print_init(const char *name)