From: Marko Luukkainen Date: Thu, 15 Aug 2019 07:10:47 +0000 (+0300) Subject: Fix NPE in branch point synchronization X-Git-Tag: v1.43.0~222^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=bcf3a9c994d2bda45fa3d2738fda8a14bb34cdcd;p=simantics%2F3d.git Fix NPE in branch point synchronization gitlab #24 Change-Id: Ibd0641bde997d1ddb454c1b596aec04b583a4807 --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java index 06944b53..f71dfed4 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java @@ -322,6 +322,8 @@ public abstract class PipelineComponent extends GeometryNode { if (branch0 != null) { if (branch0.getControlPoint() != null) { PipeControlPoint branchPoint = getBranchPoint(); + if (branchPoint == null) + return false; PipeControlPoint pcp = branch0.getControlPoint(); // TODO, relying that the other direction is connected. boolean next = branch0.getPrevious() == this; // this --> branch0