[116838] npe fix: committed for JL
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
index 4bc1fd4..bb84883 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
@@ -121,17 +121,18 @@
public Properties getMetaProperties() {
StructureEdit core = null;
+ Properties props = new Properties();
try {
core = StructureEdit.getStructureEditForRead(getProject());
+ if (core == null)
+ return props;
WorkbenchComponent component = core.getComponent();
- Properties props = new Properties();
-
- List propList = component.getProperties();
- if(propList != null) {
- for (int i = 0; i < propList.size(); i++) {
- props.setProperty(((Property)propList.get(i)).getName(), ((Property)propList.get(i)).getValue());
- }
+ List propList = component.getProperties();
+ if(propList != null) {
+ for (int i = 0; i < propList.size(); i++) {
+ props.setProperty(((Property)propList.get(i)).getName(), ((Property)propList.get(i)).getValue());
}
+ }
return props;
} finally {
if(core != null)