Hi guys.

Here's a tiny patch to avoid a NPE in SVGTextElementBridge
.getSubStringLength when you try to get the length of zero characters.

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922
--- sources/org/apache/batik/bridge/SVGTextElementBridge.java   2004-04-12 
16:13:56.000000000 +1000
+++ sources/org/apache/batik/bridge/SVGTextElementBridge.java.new       2004-04-12 
16:15:36.000000000 +1000
@@ -2399,6 +2399,10 @@
     protected float getSubStringLength(Element element,
                                        int charnum, 
                                        int nchars){
+        if (nchars == 0) {
+            return 0;
+        }
+
         float length = 0;
 
         AttributedCharacterIterator aci;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to