Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java')
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java
index 567525ee0..9bf5a2c98 100644
--- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java
+++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java
@@ -316,9 +316,15 @@ public class AttributeChangeMerger extends AbstractMerger {
* Direction of the merge.
*/
protected void changeValue(AttributeChange diff, boolean rightToLeft) {
+ final EObject targetContainer = getTargetContainer(diff, rightToLeft);
+ if (targetContainer == null) {
+ // We're merging the unset of an attribute value under a containment deletion.
+ // There's actually no action to take in such a case.
+ return;
+ }
+
final EStructuralFeature attribute = diff.getAttribute();
final Object targetValue = getTargetValue(diff, rightToLeft);
- final EObject targetContainer = getTargetContainer(diff, rightToLeft);
if (isUnset(diff, targetValue)) {
targetContainer.eUnset(attribute);

Back to the top