Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Yurkovich <jesse.y@gmail.com>2022-02-03 14:39:57 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-02-22 13:11:06 +0300
commit4f16dad6b33fc9aaf8f7a3829d96447bcd954311 (patch)
tree7f95794d31af6ea9f44bf26866516bd323e92f13
parent56958cd2e7d3942d0e8e5c6bcff5a0ca97c5ddf2 (diff)
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
-rw-r--r--source/blender/blenkernel/intern/curve.c2
1 files changed, 1 insertions, 1 deletions
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;