diff options
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_outline.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_outline.cc b/source/blender/draw/engines/overlay/overlay_outline.cc index a091bbe539b..3213fe144e9 100644 --- a/source/blender/draw/engines/overlay/overlay_outline.cc +++ b/source/blender/draw/engines/overlay/overlay_outline.cc @@ -234,8 +234,8 @@ static void gpencil_stroke_cache_populate(bGPDlayer * /*gpl*/, if (show_stroke) { int vfirst = gps->runtime.stroke_start * 3; - /* Include "potential" cyclic vertex (see shader). */ - int vcount = (gps->totpoints + 1) * 2 * 3; + bool is_cyclic = ((gps->flag & GP_STROKE_CYCLIC) != 0) && (gps->totpoints > 2); + int vcount = (gps->totpoints + (int)is_cyclic) * 2 * 3; DRW_shgroup_call_range(iter->stroke_grp, iter->ob, geom, vfirst, vcount); } } |