]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts-backend-lucene: Check that box is not NULL
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 19 Sep 2016 09:26:08 +0000 (12:26 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Sep 2016 12:40:15 +0000 (15:40 +0300)
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then.

src/plugins/fts-lucene/fts-backend-lucene.c

index 3420debe2d6c509534c46eb148e6503286f159e7..39c5a6dc5c61cc6da72dcd8f87082a8fb91ad0b2 100644 (file)
@@ -310,7 +310,7 @@ fts_backend_lucene_update_set_mailbox(struct fts_backend_update_context *_ctx,
                fts_index_set_last_uid(ctx->box, ctx->last_uid);
                ctx->last_uid = 0;
        }
-       if (ctx->first_box_vname == NULL)
+       if (ctx->first_box_vname == NULL && box != NULL)
                ctx->first_box_vname = i_strdup(box->vname);
        ctx->box = box;
        ctx->last_indexed_uid_set = FALSE;