eclipse plugin: Fix a possible NPE in xtext's framework
This commit is contained in:
parent
f28bd812a3
commit
11fc082cb7
1 changed files with 6 additions and 1 deletions
|
@ -71,7 +71,12 @@ public class WMLCharacterPairMatcher extends DefaultCharacterPairMatcher
|
|||
|
||||
public synchronized void computeMatchingRegion(XtextResource state, int offset)
|
||||
{
|
||||
EObject object = WMLUtils.EObjectUtils( ).resolveElementAt( state, offset );
|
||||
EObject object = null;
|
||||
try {
|
||||
WMLUtils.EObjectUtils( ).resolveElementAt( state, offset );
|
||||
} catch ( NullPointerException e ) {
|
||||
// fix a bug in xtext when the document has syntax errors
|
||||
}
|
||||
|
||||
// do nothing if we clicked the same tag
|
||||
if ( currentTag_ == object )
|
||||
|
|
Loading…
Add table
Reference in a new issue