]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Fix NPE in branch point synchronization 06/3106/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 15 Aug 2019 07:10:47 +0000 (10:10 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 15 Aug 2019 07:10:47 +0000 (10:10 +0300)
gitlab #24

Change-Id: Ibd0641bde997d1ddb454c1b596aec04b583a4807

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java

index 06944b53517343420418461e68148103aaaaa476..f71dfed41a8e1e676842951bf4a5fc2c60084fcc 100644 (file)
@@ -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