]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts-backend-solr: Check that box is not NULL
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 19 Sep 2016 09:26:46 +0000 (12:26 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Sep 2016 12:40:18 +0000 (15:40 +0300)
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then.

src/plugins/fts-solr/fts-backend-solr.c

index 6fa5f11ca5d4ce79afe235817926007a87f58251..3d9bc8a502579c7b55bddd4978c23b33611640e8 100644 (file)
@@ -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)