From: Timo Sirainen Date: Wed, 22 Feb 2017 08:44:00 +0000 (+0200) Subject: lib-lda: Fix pigeonhole testsuite to not crash X-Git-Tag: 2.3.0.rc1~2020 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6db1c8a3b89f6cc5a30ec62d8e735505d0187516;p=thirdparty%2Fdovecot%2Fcore.git lib-lda: Fix pigeonhole testsuite to not crash --- diff --git a/src/lib-lda/mail-deliver.c b/src/lib-lda/mail-deliver.c index a50a553959..71fd6a9ccb 100644 --- a/src/lib-lda/mail-deliver.c +++ b/src/lib-lda/mail-deliver.c @@ -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;