From 03011ff292347a508ca797b27f0a872bb22eae55 Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Mon, 13 Mar 2017 15:22:57 +0100 Subject: [PATCH] EA-98262 - IAE: VfsUtilCore.getRelativePath --- plugins/devkit/src/testAssistant/TestLocationDataRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/devkit/src/testAssistant/TestLocationDataRule.java b/plugins/devkit/src/testAssistant/TestLocationDataRule.java index 56fa658017be..0f4a71d9a19a 100644 --- a/plugins/devkit/src/testAssistant/TestLocationDataRule.java +++ b/plugins/devkit/src/testAssistant/TestLocationDataRule.java @@ -66,7 +66,7 @@ public class TestLocationDataRule implements GetDataRule { if (fileIndex.isInContent(file) && !fileIndex.isInSource(file) && !fileIndex.isInLibraryClasses(file)) { final VirtualFile parent = file.getParent(); final VirtualFile contentRoot = fileIndex.getContentRootForFile(file); - if (contentRoot != null) { + if (contentRoot != null && parent != null) { final String relativePath = VfsUtilCore.getRelativePath(parent, contentRoot, '/'); if (relativePath != null) { final PsiSearchHelper searchHelper = PsiSearchHelper.SERVICE.getInstance(project);