diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-09-05 18:01:14 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-05 18:01:35 +0300 |
commit | 5b2720befc24cb592abc425b02376852e486b1cd (patch) | |
tree | 541246fa29ea99ce0e9a99da75b9849cc78fd0b5 /source | |
parent | cd49fee741148dc9dcc0cbefce0b70ea0f2d55c6 (diff) |
GPencil: Small code cleanup
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_geom.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc index 2cc752dca47..935bc4a5529 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.cc +++ b/source/blender/blenkernel/intern/gpencil_geom.cc @@ -3545,7 +3545,7 @@ void BKE_gpencil_stroke_join(bGPDstroke *gps_a, void BKE_gpencil_stroke_start_set(bGPdata *gpd, bGPDstroke *gps, int start_idx) { - if ((start_idx < 1) || (start_idx >= gps->totpoints)) { + if ((start_idx < 1) || (start_idx >= gps->totpoints) || (gps->totpoints == 0)) { return; } @@ -3555,7 +3555,7 @@ void BKE_gpencil_stroke_start_set(bGPdata *gpd, bGPDstroke *gps, int start_idx) } bGPDstroke *gps_b = BKE_gpencil_stroke_duplicate(gps, true, false); - BKE_gpencil_stroke_trim_points(gps_b, 0, start_idx - 0); + BKE_gpencil_stroke_trim_points(gps_b, 0, start_idx); BKE_gpencil_stroke_trim_points(gps, start_idx, gps->totpoints - 1); /* Join both strokes. */ |