Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbblajer2009-08-03 16:02:04 +0000
committerbblajer2009-08-03 16:02:04 +0000
commit26deb26ee8efd3a4b022ab393cdb91bc2e86ce11 (patch)
tree1fe0ee2c2b90c6b29d202f6045a68b1dd3e5cdd9
parent0131d642533ce028c6cdb9eca249ede96efbc4f0 (diff)
downloadorg.eclipse.gmf-tooling-26deb26ee8efd3a4b022ab393cdb91bc2e86ce11.tar.gz
org.eclipse.gmf-tooling-26deb26ee8efd3a4b022ab393cdb91bc2e86ce11.tar.xz
org.eclipse.gmf-tooling-26deb26ee8efd3a4b022ab393cdb91bc2e86ce11.zip
[285451]: Avoid exception on deleting the selection that contains the phantom owner, phantom element and the phantom linkv20090812-1620
-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