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
This commit is contained in:
Jesse Yurkovich 2022-02-03 22:39:57 +11:00 committed by Philipp Oeser
parent 56958cd2e7
commit 4f16dad6b3
Notes: blender-bot 2023-02-14 05:25:44 +01:00
Referenced by issue #95137, Spline calc_length() crashes for NURBS curves with only a single point
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 1 additions and 1 deletions

View File

@ -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;