Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Faltermeier2018-03-29 12:35:02 +0000
committerJohannes Faltermeier2018-03-29 12:35:02 +0000
commit8d9e7176f5e4d0d990d88e8a133af4902d4afd8e (patch)
tree7178cd595cd1ba30a314a8809fc334925811d596
parent6348de256ec625d9b9a5d45bc06b7d4e28580173 (diff)
downloadorg.eclipse.emf.edapt-8d9e7176f5e4d0d990d88e8a133af4902d4afd8e.tar.gz
org.eclipse.emf.edapt-8d9e7176f5e4d0d990d88e8a133af4902d4afd8e.tar.xz
org.eclipse.emf.edapt-8d9e7176f5e4d0d990d88e8a133af4902d4afd8e.zip
Bug 499025 - NullPointerException in CommandStackListener.checkRecorder
* add checks to avoid NPE Change-Id: Ia2ac8195967b54dde07f3611f514e4cea91523e3 Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
-rw-r--r--plugins/org.eclipse.emf.edapt.history.edit/src/org/eclipse/emf/edapt/history/recorder/CommandStackListener.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.edapt.history.edit/src/org/eclipse/emf/edapt/history/recorder/CommandStackListener.java b/plugins/org.eclipse.emf.edapt.history.edit/src/org/eclipse/emf/edapt/history/recorder/CommandStackListener.java
index 3b7bb75..33a1691 100644
--- a/plugins/org.eclipse.emf.edapt.history.edit/src/org/eclipse/emf/edapt/history/recorder/CommandStackListener.java
+++ b/plugins/org.eclipse.emf.edapt.history.edit/src/org/eclipse/emf/edapt/history/recorder/CommandStackListener.java
@@ -142,6 +142,9 @@ public class CommandStackListener implements
* not detached due to the save mechanism which reloads the metamodel.
*/
private boolean checkRecorder() {
+ if (metamodelRecorder == null || metamodelRecorder.getElements().isEmpty()) {
+ return false;
+ }
return !metamodelRecorder.getElements().get(0).eIsProxy();
}

Back to the top