Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
index 3455625e6..e69ea1b77 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
@@ -36,7 +36,9 @@ new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand(«des
org.eclipse.emf.ecore.EObject referencedObject = getReferencedObject();
org.eclipse.emf.ecore.resource.Resource resource = referencedObject.eResource();
org.eclipse.gmf.runtime.common.core.command.CommandResult result = super.doExecuteWithResult(progressMonitor, info);
- resource.getContents().add(referencedObject);
+ if (resource != null) {
+ resource.getContents().add(referencedObject);
+ }
return result;
}
}«ENDIF-»

Back to the top