Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2012-01-26 15:15:13 -0500
committerBrian de Alwis2012-01-26 15:15:13 -0500
commiteff1723c96caab272738506267b4f589ff9f6fd9 (patch)
treefa0760538b8d3d8edb64fc32d32362db4e51334a
parent6596f726fee162692eeb74043b74257512696579 (diff)
downloadorg.eclipse.e4.tools-eff1723c96caab272738506267b4f589ff9f6fd9.tar.gz
org.eclipse.e4.tools-eff1723c96caab272738506267b4f589ff9f6fd9.tar.xz
org.eclipse.e4.tools-eff1723c96caab272738506267b4f589ff9f6fd9.zip
Prevent NPE in New E4 Project wizard if bundles not presentv20120126-2015
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
index 32bc24f6..ea336265 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
@@ -184,11 +184,13 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
IPluginImport iimport = model
.getPluginFactory().createImport();
iimport.setId(id);
- Version version = dependency.getVersion();
- String versionString = version.getMajor() + "."
- + version.getMinor() + "."
- + version.getMicro();
- iimport.setVersion(versionString);
+ if(dependency != null) {
+ Version version = dependency.getVersion();
+ String versionString = version.getMajor() + "."
+ + version.getMinor() + "."
+ + version.getMicro();
+ iimport.setVersion(versionString);
+ }
pluginBase.add(iimport);
}
}

Back to the top