commit | 8d9e7176f5e4d0d990d88e8a133af4902d4afd8e | [log] [tgz] |
---|---|---|
author | Johannes Faltermeier <jfaltermeier@eclipsesource.com> | Thu Mar 29 14:35:02 2018 +0200 |
committer | Johannes Faltermeier <jfaltermeier@eclipsesource.com> | Thu Mar 29 14:35:02 2018 +0200 |
tree | 7178cd595cd1ba30a314a8809fc334925811d596 | |
parent | 6348de256ec625d9b9a5d45bc06b7d4e28580173 [diff] |
Bug 499025 - NullPointerException in CommandStackListener.checkRecorder * add checks to avoid NPE Change-Id: Ia2ac8195967b54dde07f3611f514e4cea91523e3 Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
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 @@ * 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(); }