Fix: Crash when geometry nodes NURB spline has no evaluated points

This commit is contained in:
Hans Goudey 2021-07-06 13:12:27 -05:00
parent 586cf8b190
commit 40de5742af
1 changed files with 4 additions and 1 deletions

View File

@ -346,7 +346,10 @@ Span<NURBSpline::BasisCache> NURBSpline::calculate_basis_cache() const
const int size = this->size();
const int eval_size = this->evaluated_points_size();
BLI_assert(this->evaluated_edges_size() > 0);
if (eval_size == 0) {
return {};
}
basis_cache_.resize(eval_size);
const int order = this->order();