From bcf3a9c994d2bda45fa3d2738fda8a14bb34cdcd Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 15 Aug 2019 10:10:47 +0300 Subject: [PATCH] Fix NPE in branch point synchronization gitlab #24 Change-Id: Ibd0641bde997d1ddb454c1b596aec04b583a4807 --- .../src/org/simantics/plant3d/scenegraph/PipelineComponent.java | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.47.1