Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormvelten2012-04-10 08:21:25 +0000
committermvelten2012-04-10 08:21:25 +0000
commitf1730bc2a8d6eb5d7c635784c3bdbdfc093b8283 (patch)
treeed21d8ef733631a69e1e45d95290d6e1a8d3ca48
parent689bdcbe6866e93d84cf0fc03da35ffe8e9cfb14 (diff)
downloadorg.eclipse.papyrus-f1730bc2a8d6eb5d7c635784c3bdbdfc093b8283.tar.gz
org.eclipse.papyrus-f1730bc2a8d6eb5d7c635784c3bdbdfc093b8283.tar.xz
org.eclipse.papyrus-f1730bc2a8d6eb5d7c635784c3bdbdfc093b8283.zip
fix NPE
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java b/plugins/sysml/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
index 3f081bbd1eb..62cb08ce447 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
@@ -82,7 +82,9 @@ public class CreateRequirementTableCommand extends AbstractCreateNattableEditorC
Element el = (Element)object;
Package pack = el.getNearestPackage();
//we can create an Allocation Table only when the profile is applied
- return pack.getAppliedProfile(SysmlResource.REQUIREMENTS_ID, true) != null;
+ if (pack != null) {
+ return pack.getAppliedProfile(SysmlResource.REQUIREMENTS_ID, true) != null;
+ }
}
return false;
}

Back to the top