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:
parent
df5da16aa1
commit
3cfccf1199
Notes:
blender-bot
2023-02-14 06:47:29 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #95137, Spline calc_length() crashes for NURBS curves with only a single point
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue