From: niemisto Date: Mon, 25 Jan 2010 15:30:00 +0000 (+0000) Subject: fixing npe if shape is null X-Git-Tag: simantics-1.0~100 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=0dfcbb0913541f303cb44dd495443f0ef5b66eab;p=simantics%2Fsysdyn.git fixing npe if shape is null git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@13629 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.h2d/src/org/simantics/h2d/node/FilledShapeNode.java b/org.simantics.h2d/src/org/simantics/h2d/node/FilledShapeNode.java index e3d33667..1bf08a38 100644 --- a/org.simantics.h2d/src/org/simantics/h2d/node/FilledShapeNode.java +++ b/org.simantics.h2d/src/org/simantics/h2d/node/FilledShapeNode.java @@ -34,6 +34,8 @@ public class FilledShapeNode extends G2DNode { @Override public Rectangle2D getBoundsInLocal() { + if(shape == null) + return null; return shape.getBounds2D(); }