changeset 20750:5c23afbfd028

fts-backend-lucene: Check that box is not NULL fts_backend_update_deinit will set box to NULL and call update_set_mailbox then.
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 19 Sep 2016 12:26:08 +0300
parents 060c9249d7af
children b1a794ec2016
files src/plugins/fts-lucene/fts-backend-lucene.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/fts-lucene/fts-backend-lucene.c	Sat Sep 17 12:57:00 2016 +0300
+++ b/src/plugins/fts-lucene/fts-backend-lucene.c	Mon Sep 19 12:26:08 2016 +0300
@@ -310,7 +310,7 @@
 		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;