Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java b/plugins/sysml/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
index 7dcac8210af..178be0f7d11 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
@@ -78,7 +78,9 @@ public class CreateAllocationTableCommand extends AbstractCreateNattableEditorCo
Element el = (Element)object;
Package pack = el.getNearestPackage();
//we can create an Allocation Table only when the profile is applied
- return pack.getAppliedProfile(SysmlResource.ALLOCATIONS_ID, true) != null;
+ if (pack != null) {
+ return pack.getAppliedProfile(SysmlResource.ALLOCATIONS_ID, true) != null;
+ }
}
return false;
}

Back to the top