From 3eea14f6e7b40710b89ba4721a28b52d0abc6941 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Thu, 5 Dec 2019 13:52:38 +0200 Subject: [PATCH] Refuse attempts to set turn radius index to a negative value. gitlab #63 Change-Id: I98564e31efb7ba483c7b5dd4a3988098889bb134 (cherry picked from commit d7f763511294343dca804fc5909a41fff39db91c) --- .../src/org/simantics/plant3d/scenegraph/TurnComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java index 5c3a1e98..794c5329 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java @@ -140,7 +140,7 @@ public class TurnComponent extends PipelineComponent { public void setTurnRadiusIndex(Integer turnRadiusIndex) { if (this.turnRadiusIndex == turnRadiusIndex) return; - if (turnRadiusIndex == null) + if (turnRadiusIndex == null || turnRadiusIndex < 0) return; if (turnRadiusIndex != null && getPipeRun() != null) { if (getPipeRun().getTurnRadiusArray().length <= turnRadiusIndex) -- 2.47.1