Author: timotei
Date: Mon Aug 1 20:51:23 2011
New Revision: 50531
URL: http://svn.gna.org/viewcvs/wesnoth?rev=50531&view=rev
Log:
eclipse plugin: Fix a possible NPE in xtext's framework
Modified:
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/syntax/WMLCharacterPairMatcher.java
Modified:
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/syntax/WMLCharacterPairMatcher.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/syntax/WMLCharacterPairMatcher.java?rev=50531&r1=50530&r2=50531&view=diff
==============================================================================
---
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/syntax/WMLCharacterPairMatcher.java
(original)
+++
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/syntax/WMLCharacterPairMatcher.java
Mon Aug 1 20:51:23 2011
@@ -71,7 +71,12 @@
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 )
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits