]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Merge "Fix NPE in branch point synchronization"
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 15 Aug 2019 09:17:35 +0000 (09:17 +0000)
committerGerrit Code Review <gerrit2@simantics>
Thu, 15 Aug 2019 09:17:35 +0000 (09:17 +0000)
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