]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts-backend-lucene: Check that box is not NULL
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 19 Sep 2016 09:26:08 +0000 (12:26 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 19 Sep 2016 09:34:54 +0000 (12:34 +0300)
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then.

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

index da1c3c1299079dedebb395919706cd6da8ab0517..f18b9c6c64dcd5f12a76c981592e0a5af56dd2d5 100644 (file)
@@ -310,7 +310,7 @@ fts_backend_lucene_update_set_mailbox(struct fts_backend_update_context *_ctx,
                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;