[Bf-blender-cvs] [70de992afe9] master: Fix: Incorrect assert conditions in NURBSpline
Piotr Makal
noreply at git.blender.org
Mon Dec 20 19:43:32 CET 2021
Commit: 70de992afe92b0267687d648af99e3f42be83092
Author: Piotr Makal
Date: Mon Dec 20 12:43:14 2021 -0600
Branches: master
https://developer.blender.org/rB70de992afe92b0267687d648af99e3f42be83092
Fix: Incorrect assert conditions in NURBSpline
This fix provides better conditions for asserts in `NURBSpline::knots`
method accounting for cyclic NURBS curves.
Differential Revision: https://developer.blender.org/D13620
===================================================================
M source/blender/blenkernel/intern/spline_nurbs.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/spline_nurbs.cc b/source/blender/blenkernel/intern/spline_nurbs.cc
index 69afb82baa8..e9d4ba7c7ef 100644
--- a/source/blender/blenkernel/intern/spline_nurbs.cc
+++ b/source/blender/blenkernel/intern/spline_nurbs.cc
@@ -257,13 +257,13 @@ void NURBSpline::calculate_knots() const
Span<float> NURBSpline::knots() const
{
if (!knots_dirty_) {
- BLI_assert(knots_.size() == this->size() + order_);
+ BLI_assert(knots_.size() == this->knots_size());
return knots_;
}
std::lock_guard lock{knots_mutex_};
if (!knots_dirty_) {
- BLI_assert(knots_.size() == this->size() + order_);
+ BLI_assert(knots_.size() == this->knots_size());
return knots_;
}
More information about the Bf-blender-cvs
mailing list