Fix T89993: Failed assert drawing single point cyclic splines

The same check used for the curve to mesh node.
This commit is contained in:
Hans Goudey 2021-07-20 14:54:01 -04:00
parent cf28398471
commit aeee7f390d
Notes: blender-bot 2023-02-14 02:22:07 +01:00
Referenced by issue #89993, Blender Assert: Hitting with Resample Curve Node
1 changed files with 1 additions and 1 deletions

View File

@ -663,7 +663,7 @@ static void curve_create_curves_lines(CurveRenderData *rdata, GPUIndexBuf *ibo_c
for (const int i_spline : splines.index_range()) {
const int eval_size = splines[i_spline]->evaluated_points_size();
if (splines[i_spline]->is_cyclic()) {
if (splines[i_spline]->is_cyclic() && splines[i_spline]->evaluated_edges_size() > 1) {
GPU_indexbuf_add_generic_vert(&elb, offsets[i_spline] + eval_size - 1);
}
for (const int i_point : IndexRange(eval_size)) {