Skip to content

Commit 7d48ade

Browse files
Merge pull request #250 from snyk/fix/npe-with-no-project
fix: prevent npe and user-facing error when eclipse is loaded with no projects open [IDE-845]
2 parents 0b93830 + 43fa584 commit 7d48ade

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/src/main/java/io/snyk/eclipse/plugin/views/snyktoolview/ContentRootNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public Path getPath() {
7575
}
7676

7777
public void setPath(Path path) {
78-
this.path = path.normalize();
78+
if (path != null) {
79+
this.path = path.normalize();
80+
}
7981
}
8082

8183
public String getName() {

0 commit comments

Comments
 (0)