diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index f41adec1079f..de6c035984c1 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -442,8 +442,10 @@ public class FileBasedIndex implements ApplicationComponent { private UpdatableIndex createIndex(final ID indexId, final FileBasedIndexExtension extension, final MemoryIndexStorage storage) throws IOException { final MapReduceIndex index; if (extension instanceof CustomImplementationFileBasedIndexExtension) { - final UpdatableIndex custom = - ((CustomImplementationFileBasedIndexExtension)extension).createIndexImplementation(indexId, this, storage); + final UpdatableIndex custom = ((CustomImplementationFileBasedIndexExtension)extension).createIndexImplementation(indexId, this, storage); + + assert custom != null : "Custom index implementation must not be null; index: " + indexId; + if (!(custom instanceof MapReduceIndex)) { return custom; }