Fix #109171: Delete curve instead of creating empty result

If accumulated amount of points is zero, next offsets
will be empty too. Instead to expand offsets to create
empty curve, just delete source curve and skip any next steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/109172
This commit is contained in:
Iliya Katueshenock
2023-06-21 02:27:58 +02:00
committed by Hans Goudey
parent 2ef27684c5
commit fa505d7c18

View File

@@ -329,6 +329,12 @@ static void duplicate_curves(GeometrySet &geometry_set,
dst_curves_num += count;
dst_points_num += count * points_by_curve[selection[i_curve]].size();
}
if (dst_points_num == 0) {
geometry_set.remove_geometry_during_modify();
return;
}
curve_offset_data.last() = dst_curves_num;
point_offset_data.last() = dst_points_num;