From ff3bf633ae277fceeb7e3e9b12d0a1064995c31d Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 19 Sep 2016 12:26:08 +0300 Subject: [PATCH] fts-backend-lucene: Check that box is not NULL fts_backend_update_deinit will set box to NULL and call update_set_mailbox then. --- src/plugins/fts-lucene/fts-backend-lucene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fts-lucene/fts-backend-lucene.c b/src/plugins/fts-lucene/fts-backend-lucene.c index 3420debe2d..39c5a6dc5c 100644 --- a/src/plugins/fts-lucene/fts-backend-lucene.c +++ b/src/plugins/fts-lucene/fts-backend-lucene.c @@ -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;