From 04dac377dff1b39ee7638cddf0949e4a549e5998 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 21 May 2015 16:06:26 +0200 Subject: [PATCH] EA-56301 - assert: ProjectViewModuleNode.getChildren --- .../impl/nodes/ProjectViewModuleNode.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java index a065304d328b..8c8446faf432 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java @@ -57,22 +57,22 @@ public class ProjectViewModuleNode extends AbstractModuleNode { final VirtualFile[] contentRoots = rootManager.getContentRoots(); final List children = new ArrayList(contentRoots.length + 1); - final PsiManager psiManager = PsiManager.getInstance(getProject()); + final PsiManager psiManager = PsiManager.getInstance(module.getProject()); for (final VirtualFile contentRoot : contentRoots) { if (!moduleFileIndex.isInContent(contentRoot)) continue; - AbstractTreeNode child; if (contentRoot.isDirectory()) { PsiDirectory directory = psiManager.findDirectory(contentRoot); - LOG.assertTrue(directory != null); - child = new PsiDirectoryNode(getProject(), directory, getSettings()); + if (directory != null) { + children.add(new PsiDirectoryNode(getProject(), directory, getSettings())); + } } else { PsiFile file = psiManager.findFile(contentRoot); - LOG.assertTrue(file != null); - child = new PsiFileNode(getProject(), file, getSettings()); + if (file != null) { + children.add(new PsiFileNode(getProject(), file, getSettings())); + } } - children.add(child); } /*