changeset 20751:b1a794ec2016

fts-backend-solr: 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:46 +0300
parents 5c23afbfd028
children 1194ca07a620
files src/plugins/fts-solr/fts-backend-solr.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/fts-solr/fts-backend-solr.c	Mon Sep 19 12:26:08 2016 +0300
+++ b/src/plugins/fts-solr/fts-backend-solr.c	Mon Sep 19 12:26:46 2016 +0300
@@ -424,6 +424,8 @@
 	const char *box_guid;
 
 	if (ctx->prev_uid != 0) {
+		i_assert(ctx->cur_box != NULL);
+
 		/* flush solr between mailboxes, so we don't wrongly update
 		   last_uid before we know it has succeeded */
 		if (fts_backed_solr_build_flush(ctx) < 0)