excluded files icons: IAE fixed (EA-102341)

This commit is contained in:
nik
2017-06-01 19:38:44 +03:00
parent 7fa392c93e
commit d8b20fe112
@@ -37,7 +37,7 @@ public class ExcludeFileIconLayerProvider implements IconLayerProvider {
if (element instanceof PsiFile) {
VirtualFile virtualFile = ((PsiFile)element).getVirtualFile();
ProjectFileIndex index = ProjectFileIndex.getInstance(((PsiFile)element).getProject());
if (index.isExcluded(virtualFile)) {
if (virtualFile != null && index.isExcluded(virtualFile)) {
//If the parent directory is also excluded it'll have a special icon (see DirectoryIconProvider), so it makes no sense to add
// additional marks for all files under it.
if (!index.isExcluded(virtualFile.getParent())) {