diff --git a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeStructure.java b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeStructure.java index d53565cba4de..5b57ec29cb21 100644 --- a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeStructure.java +++ b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeStructure.java @@ -18,6 +18,7 @@ package com.intellij.ide.hierarchy; import com.intellij.ide.util.treeView.AbstractTreeStructure; import com.intellij.ide.util.treeView.NodeDescriptor; +import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.TestSourcesFilter; import com.intellij.openapi.util.ActionCallback; @@ -93,7 +94,12 @@ public abstract class HierarchyTreeStructure extends AbstractTreeStructure { final Object[] cachedChildren = descriptor.getCachedChildren(); if (cachedChildren == null) { if (descriptor.isValid()) { - descriptor.setCachedChildren(buildChildren(descriptor)); + try { + descriptor.setCachedChildren(buildChildren(descriptor)); + } + catch (IndexNotReadyException e) { + return ArrayUtil.EMPTY_OBJECT_ARRAY; + } } else { descriptor.setCachedChildren(ArrayUtil.EMPTY_OBJECT_ARRAY);