Fix: Failed assert for evaluated lengths of single point curves
Since 2d80f814cc
, curves always have evaluated points,
but single point curves do no have any evaluated segments, and the
leading zero length isn't stored in the curves length cache.
This commit is contained in:
parent
86cfc30aac
commit
218f23935c
|
@ -785,6 +785,9 @@ inline float CurvesGeometry::evaluated_length_total_for_curve(const int curve_in
|
|||
const bool cyclic) const
|
||||
{
|
||||
const Span<float> lengths = this->evaluated_lengths_for_curve(curve_index, cyclic);
|
||||
if (lengths.is_empty()) {
|
||||
return 0.0f;
|
||||
}
|
||||
return lengths.last();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue