Author: timotei
Date: Tue Jul 26 17:31:20 2011
New Revision: 50425

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50425&view=rev
Log:
eclipse plugin: Fix a NPE exception

Modified:
    
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/folding/WMLFoldingRegionProvider.java

Modified: 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/folding/WMLFoldingRegionProvider.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/folding/WMLFoldingRegionProvider.java?rev=50425&r1=50424&r2=50425&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/folding/WMLFoldingRegionProvider.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/folding/WMLFoldingRegionProvider.java
 Tue Jul 26 17:31:20 2011
@@ -57,10 +57,12 @@
             else if ( eObject instanceof WMLMacroDefine )
                 endName = ( ( WMLMacroDefine ) eObject ).getEndName( );
 
-            if ( endName.endsWith( "\r\n" ) )
-                length -= 2;
-            else if ( endName.endsWith( "\n" ) )
-                -- length;
+            if ( endName != null ) {
+                if ( endName.endsWith( "\r\n" ) )
+                    length -= 2;
+                else if ( endName.endsWith( "\n" ) )
+                    -- length;
+            }
 
             foldingRegionAcceptor.accept(offset, length, significant);
         }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to