You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by dv...@apache.org on 2007/03/11 15:53:19 UTC

svn commit: r516914 - /xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java

Author: dvholten
Date: Sun Mar 11 07:53:18 2007
New Revision: 516914

URL: http://svn.apache.org/viewvc?view=rev&rev=516914
Log:
prevent a potential NPE

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java?view=diff&rev=516914&r1=516913&r2=516914
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java Sun Mar 11 07:53:18 2007
@@ -2924,9 +2924,11 @@
             }
 
             Rectangle2D glBounds = layout.getBounds2D();
-            if (glBounds != null)
-                glBounds = at.createTransformedShape
-                    (glBounds).getBounds2D();
+            if ( glBounds == null ){
+                continue;
+            }
+
+            glBounds = at.createTransformedShape( glBounds ).getBounds2D();
 
             if (rect.contains(glBounds)) {
                 elems.add(elem);