Fix: crash duplicating empty hair
Attempt to access `points_by_curve.data().last()` on an empty array crashed on a null pointer dereference. Ref !135956
This commit is contained in:
@@ -116,6 +116,9 @@ static void curve_offsets_from_selection(const Span<IndexRange> selected_points,
|
||||
|
||||
void duplicate_points(bke::CurvesGeometry &curves, const IndexMask &mask)
|
||||
{
|
||||
if (curves.is_empty()) {
|
||||
return;
|
||||
}
|
||||
const OffsetIndices<int> points_by_curve = curves.points_by_curve();
|
||||
const VArray<bool> src_cyclic = curves.cyclic();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user