Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Prouvost2015-11-04 17:03:23 +0000
committerOlivier Prouvost2015-11-04 17:03:23 +0000
commit3c77fad8a1913fc8003bf4e6d222706fed9da922 (patch)
treecc12a44fa8d200ef293445eb0b9607b94004e374
parent6b170ebcf4538e836447083b7271264c9aa0e9bf (diff)
downloadeclipse.platform.ui.tools-3c77fad8a1913fc8003bf4e6d222706fed9da922.tar.gz
eclipse.platform.ui.tools-3c77fad8a1913fc8003bf4e6d222706fed9da922.tar.xz
eclipse.platform.ui.tools-3c77fad8a1913fc8003bf4e6d222706fed9da922.zip
Bug 481435 - NPE in placeholder editorI20151110-0800
Change-Id: Iedd6b60d1024cb6308b80653020700b56b82314e Signed-off-by: Olivier Prouvost <olivier.prouvost@opcoach.com>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
index 97b82149..2488267d 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
@@ -1994,7 +1994,7 @@ public class ModelEditor implements IGotoObject {
final Object type = event.getProperty(EventTags.TYPE);
final Object newValue = event.getProperty(EventTags.NEW_VALUE);
- if (UIEvents.EventTypes.SET.equals(type) && Boolean.FALSE.equals(newValue)) {
+ if (UIEvents.EventTypes.SET.equals(type) && Boolean.FALSE.equals(newValue) && viewer != null) {
viewer.refresh(true);
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java
index 066e64fa..14c0fdeb 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java
@@ -296,7 +296,7 @@ public class PlaceholderEditor extends AbstractComponentEditor {
final Object type = event.getProperty(EventTags.TYPE);
final Object newValue = event.getProperty(EventTags.NEW_VALUE);
- if (UIEvents.EventTypes.SET.equals(type) && Boolean.FALSE.equals(newValue)) {
+ if (UIEvents.EventTypes.SET.equals(type) && Boolean.FALSE.equals(newValue) && context != null) {
context.updateTargets();
}
}

Back to the top