diff options
author | Jan Belle | 2019-03-26 13:20:47 +0000 |
---|---|---|
committer | Jan Belle | 2019-03-26 13:20:47 +0000 |
commit | af478656675a88011db86ea5a8bfd645e6c63d00 (patch) | |
tree | 5c4986f29e55d27d2454c593fda75f182993fccf | |
parent | a8e38936ea03eeb490195d93935797e3f13e6bef (diff) | |
download | org.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
Bug 545791
Change-Id: I59da88fc094e0adb69bbcca24394b486c1e856b6
-rw-r--r-- | plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/modelpath/ModelPathResourceSetInitializer.java | 6 |
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 { |