Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2019-03-26 09:20:47 -0400
committerJan Belle2019-03-26 09:20:47 -0400
commitaf478656675a88011db86ea5a8bfd645e6c63d00 (patch)
tree5c4986f29e55d27d2454c593fda75f182993fccf /plugins
parenta8e38936ea03eeb490195d93935797e3f13e6bef (diff)
downloadorg.eclipse.etrice-af478656675a88011db86ea5a8bfd645e6c63d00.tar.gz
org.eclipse.etrice-af478656675a88011db86ea5a8bfd645e6c63d00.tar.xz
org.eclipse.etrice-af478656675a88011db86ea5a8bfd645e6c63d00.zip
[common.ui] Fix null pointer exception in model path manager
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java b/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java
index d57181620..21803f6bf 100644
--- a/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java
+++ b/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java
@@ -33,8 +33,10 @@ public class ModelPathResourceSetInitializer implements IResourceSetInitializer
@Override
public void initialize(ResourceSet resourceSet, IProject project) {
- ModelPathDelegate modelPath = new ModelPathDelegate(project);
- resourceSet.getLoadOptions().put(ResourceSetModelPathProvider.LOAD_OPTION_MODELPATH, modelPath);
+ if(project != null) {
+ ModelPathDelegate modelPath = new ModelPathDelegate(project);
+ resourceSet.getLoadOptions().put(ResourceSetModelPathProvider.LOAD_OPTION_MODELPATH, modelPath);
+ }
}
private class ModelPathDelegate implements IModelPath {

Back to the top