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.2.26~250 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04a1b385004803577f11f76781c35d043a1838f6;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 6fa5f11ca5..3d9bc8a502 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)