EA-51102 - assert: ComponentManagerImpl.getComponent

This commit is contained in:
Dmitry Jemerov
2013-10-30 19:50:09 +01:00
parent f64832e51f
commit bbbcefe668
@@ -63,7 +63,7 @@ public class ProjectRootsUtil {
public static SourceFolder getModuleSourceRoot(@NotNull VirtualFile root, @NotNull Project project) {
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
final Module module = projectFileIndex.getModuleForFile(root);
return module != null ? findSourceFolder(module, root) : null;
return module != null && !module.isDisposed() ? findSourceFolder(module, root) : null;
}
public static boolean isLibraryRoot(final VirtualFile directoryFile, final Project project) {