Fix: Curve to mesh node fails with one point and no profile

Just because the spline is cyclic does not necessarily mean that it has
an edge.
This commit is contained in:
Hans Goudey 2021-05-07 09:55:32 -05:00
parent 36ffa5b915
commit 5bfd5e77b7
Notes: blender-bot 2023-02-13 18:34:11 +01:00
Referenced by issue #88623, Crash when rendering animation with mpeg-1
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ static void vert_extrude_to_mesh_data(const Spline &spline,
edge.flag = ME_LOOSEEDGE;
}
if (spline.is_cyclic()) {
if (spline.is_cyclic() && spline.evaluated_edges_size() > 1) {
MEdge &edge = r_edges[edge_offset++];
edge.v1 = vert_offset;
edge.v2 = vert_offset + positions.size() - 1;