diff options
author | Piotr Makal <pmakal> | 2021-12-20 21:43:14 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-20 21:43:14 +0300 |
commit | 70de992afe92b0267687d648af99e3f42be83092 (patch) | |
tree | 8ed99f7d0991f6728520f1a6c20c3b31bc8d0c10 /source/blender/blenkernel | |
parent | 76cb11e3320c269f3dfec56b9fb2432e8050a297 (diff) |
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
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/spline_nurbs.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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_; } |