]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Another -A crashfix for mail commands that don't print anything.
authorTimo Sirainen <tss@iki.fi>
Thu, 17 Jun 2010 15:00:01 +0000 (16:00 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 17 Jun 2010 15:00:01 +0000 (16:00 +0100)
--HG--
branch : HEAD

src/doveadm/doveadm-print.c

index 3bf89852fec6c20afb5266c01b6da5eeaa6f7c71..47a0ec830f03557c8543987fe37405314e6dea12 100644 (file)
@@ -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);