]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Fix pigeonhole testsuite to not crash
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Feb 2017 08:44:00 +0000 (10:44 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Feb 2017 08:44:29 +0000 (10:44 +0200)
src/lib-lda/mail-deliver.c

index a50a553959e2990cf55946c824436342ccfb1cbb..71fd6a9ccb0e82d6b1f0623e64c1bf8d7b32a313 100644 (file)
@@ -233,10 +233,11 @@ int mail_deliver_save_open(struct mail_deliver_save_open_context *ctx,
        }
 
        *box_r = box = mailbox_alloc(ns->list, name, flags);
-       /* flag that this mailbox is used for delivering the mail. */
+       /* flag that this mailbox is used for delivering the mail.
+          the context isn't set in pigeonhole testuite. */
        struct mail_deliver_mailbox *mbox = MAIL_DELIVER_STORAGE_CONTEXT(box);
-       i_assert(mbox != NULL);
-       mbox->delivery_box = TRUE;
+       if (mbox != NULL)
+               mbox->delivery_box = TRUE;
 
        if (mailbox_open(box) == 0)
                return 0;