From f7e895dbf67a258ec8dee1e6384987fb3d83eefd Mon Sep 17 00:00:00 2001 From: kitfox Date: Thu, 4 Jul 2013 21:20:34 +0000 Subject: Checking for null before TransformableElement.getXForm() git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@159 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- src/main/java/com/kitfox/svg/ImageSVG.java | 2 +- src/main/java/com/kitfox/svg/TransformableElement.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kitfox/svg/ImageSVG.java b/src/main/java/com/kitfox/svg/ImageSVG.java index 5b4c66f..44c5466 100644 --- a/src/main/java/com/kitfox/svg/ImageSVG.java +++ b/src/main/java/com/kitfox/svg/ImageSVG.java @@ -123,7 +123,7 @@ public class ImageSVG extends RenderableElement } catch (Exception e) { Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, - "Could not parse xlink:href", e); + "Could not parse xlink:href " + src, e); // e.printStackTrace(); imageSrc = null; } diff --git a/src/main/java/com/kitfox/svg/TransformableElement.java b/src/main/java/com/kitfox/svg/TransformableElement.java index f5a3e58..a8f951f 100644 --- a/src/main/java/com/kitfox/svg/TransformableElement.java +++ b/src/main/java/com/kitfox/svg/TransformableElement.java @@ -70,7 +70,7 @@ abstract public class TransformableElement extends SVGElement */ public AffineTransform getXForm() { - return new AffineTransform(xform); + return xform == null ? null : new AffineTransform(xform); } /* public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent) -- cgit v1.2.3-55-g7522