Commit: 4f16dad6b33fc9aaf8f7a3829d96447bcd954311
Author: Jesse Yurkovich
Date:   Thu Feb 3 22:39:57 2022 +1100
Branches: blender-v2.83-release
https://developer.blender.org/rB4f16dad6b33fc9aaf8f7a3829d96447bcd954311

Fix T95137: Spline calc_length not working with just 1 NURB point

The NURB case did not properly handle a curve with only 1 point.

Ref D13904

===================================================================

M       source/blender/blenkernel/intern/curve.c

===================================================================

diff --git a/source/blender/blenkernel/intern/curve.c 
b/source/blender/blenkernel/intern/curve.c
index 5282cbe4c67..f23c0654877 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -746,7 +746,7 @@ float BKE_nurb_calc_length(const Nurb *nu, int resolution)
         pntsit = points + 3;
       }
 
-      while (--b) {
+      while (--b > 0) {
         length += len_v3v3(prevpntsit, pntsit);
         prevpntsit = pntsit;
         pntsit += 3;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to