]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
fixing npe if shape is null
authorniemisto <niemisto@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 25 Jan 2010 15:30:00 +0000 (15:30 +0000)
committerniemisto <niemisto@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 25 Jan 2010 15:30:00 +0000 (15:30 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@13629 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.h2d/src/org/simantics/h2d/node/FilledShapeNode.java

index e3d336676d14dadf10bd5e212cffd28725da8f30..1bf08a388bef35c5fa16f1cd51ebd222de84623a 100644 (file)
@@ -34,6 +34,8 @@ public class FilledShapeNode extends G2DNode {
 
     @Override
     public Rectangle2D getBoundsInLocal() {
+        if(shape == null)
+            return null;
         return shape.getBounds2D();
     }