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-21 12:23:46 +0300
commit3cfccf11997e9dc2f07000b9d802f0a6038e8ec1 (patch)
treec6b35e6ec3614249334bda3feee3a297ba8733c8
parentdf5da16aa117df150b0887b827733f8768cebe12 (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 37cd62c3bc8..4fc4f3e0bcd 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -915,7 +915,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;