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=refs%2Fchanges%2F06%2F3106%2F1;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