summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormclay2009-01-05 06:16:18 (EST)
committer sefftinge2009-01-05 06:16:18 (EST)
commitde1d4eacb1f961d859e3d31536a4d3e46bd122ff (patch)
tree85cb1e75806f01c76493dc8db15faf793d63b68f
parentc425a03f3348d70d3c6a8abad6a0b68a39e7fade (diff)
downloadorg.eclipse.xtext-de1d4eacb1f961d859e3d31536a4d3e46bd122ff.zip
org.eclipse.xtext-de1d4eacb1f961d859e3d31536a4d3e46bd122ff.tar.gz
org.eclipse.xtext-de1d4eacb1f961d859e3d31536a4d3e46bd122ff.tar.bz2
fix: add Iterator#hasNext() check to avoid NPE
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextResourceChecker.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextResourceChecker.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextResourceChecker.java
index 7aa5a90..56ee6f9 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextResourceChecker.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextResourceChecker.java
@@ -132,7 +132,7 @@ public class XtextResourceChecker {
if (causer instanceof EObject) {
EObject ele = (EObject) causer;
NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(ele);
- if (nodeAdapter != null) {
+ if (nodeAdapter != null && data.hasNext()) {
AbstractNode parserNode = nodeAdapter.getParserNode();
// feature is the second element see Diagnostician.getData
Object feature = data.next();