Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-09-05 18:08:23 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-09-05 18:08:23 +0300
commit191872a836715e8f7ac4d7ecb10a2bd0555213f1 (patch)
treea224c751c449e6a8cd101b0f4def575d25359c20
parentffe4840c2b98c16514421977e464191d7a1cab7a (diff)
GPencil: Improve previous commit error checking
Better check if the strokes has more points. A 0 or 1 point stroke never need to set start point.
-rw-r--r--source/blender/blenkernel/intern/gpencil_geom.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc
index 935bc4a5529..16e71c7418c 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) || (gps->totpoints == 0)) {
+ if ((start_idx < 1) || (start_idx >= gps->totpoints) || (gps->totpoints < 2)) {
return;
}