From: Aki Tuomi Date: Mon, 19 Sep 2016 09:26:46 +0000 (+0300) Subject: fts-backend-solr: Check that box is not NULL X-Git-Tag: 2.3.0.rc1~3007 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=768ac0aa3403eee7146ec01acff401c004fef7f7;p=thirdparty%2Fdovecot%2Fcore.git fts-backend-solr: Check that box is not NULL fts_backend_update_deinit will set box to NULL and call update_set_mailbox then. --- diff --git a/src/plugins/fts-solr/fts-backend-solr.c b/src/plugins/fts-solr/fts-backend-solr.c index d0c85d3cdb..b367c88259 100644 --- a/src/plugins/fts-solr/fts-backend-solr.c +++ b/src/plugins/fts-solr/fts-backend-solr.c @@ -424,6 +424,8 @@ fts_backend_solr_update_set_mailbox(struct fts_backend_update_context *_ctx, 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)