From 540cba4bb77b1ad43c14a71a3022f9f482104964 Mon Sep 17 00:00:00 2001 From: Springrbua Date: Tue, 19 Sep 2017 13:31:06 +0200 Subject: [PATCH] * Fix possible NullPointer in IDETypeScriptRepositoryManager#getPath Project is null, when used in global preferences. --- .../core/repository/IDETypeScriptRepositoryManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/repository/IDETypeScriptRepositoryManager.java b/eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/repository/IDETypeScriptRepositoryManager.java index 184744b3..d45789d9 100644 --- a/eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/repository/IDETypeScriptRepositoryManager.java +++ b/eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/repository/IDETypeScriptRepositoryManager.java @@ -82,7 +82,7 @@ public IPath getPath(String path, IProject project) { // ${project_loc:node_modules/typescript String projectPath = path.substring(PROJECT_LOC_TOKEN.length(), path.endsWith(END_TOKEN) ? path.length() - 1 : path.length()); - IPath location = project.getLocation(); + IPath location = project != null ? project.getLocation() : null; return location != null ? location.append(projectPath) : null; } else if (path.startsWith(WORKSPACE_LOC_TOKEN)) { String wsPath = path.substring(WORKSPACE_LOC_TOKEN.length(),