Skip to content

Commit

Permalink
LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't im…
Browse files Browse the repository at this point in the history
…plement list_index_corrupted()

Broken by recent changes.
  • Loading branch information
sirainen authored and villesavolainen committed Feb 9, 2018
1 parent 2916c8a commit 48bdb5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-storage/list/mailbox-list-index-backend.c
Expand Up @@ -582,7 +582,8 @@ void mailbox_list_index_backend_sync_init(struct mailbox *box,
!ilist->force_resynced) {
box->storage->list_index_rebuild_reason =
MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_FORCE_RESYNC;
if (box->storage->v.list_index_corrupted(box->storage) < 0)
if (box->storage->v.list_index_corrupted != NULL &&
box->storage->v.list_index_corrupted(box->storage) < 0)
ilist->force_resync_failed = TRUE;
/* try to rebuild list index only once - even if it failed */
ilist->force_resynced = TRUE;
Expand Down

0 comments on commit 48bdb5a

Please sign in to comment.