[Bf-blender-cvs] [7dbf7255c2c] master: GPencil: Fix error when stroke has 0 points
Antonio Vazquez
noreply at git.blender.org
Sat Mar 28 12:33:38 CET 2020
Commit: 7dbf7255c2c0d80cd5baf341232fe103185e64a8
Author: Antonio Vazquez
Date: Sat Mar 28 12:33:32 2020 +0100
Branches: master
https://developer.blender.org/rB7dbf7255c2c0d80cd5baf341232fe103185e64a8
GPencil: Fix error when stroke has 0 points
It's possible create a stroke with 0 points using python
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 555b0af5a63..fc7f15348bc 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1926,6 +1926,9 @@ void BKE_gpencil_visible_stroke_iter(
}
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
+ if (gps->totpoints == 0) {
+ continue;
+ }
stroke_cb(gpl, gpf, gps, thunk);
}
}
@@ -1939,6 +1942,9 @@ void BKE_gpencil_visible_stroke_iter(
}
LISTBASE_FOREACH (bGPDstroke *, gps, &act_gpf->strokes) {
+ if (gps->totpoints == 0) {
+ continue;
+ }
stroke_cb(gpl, act_gpf, gps, thunk);
}
}
More information about the Bf-blender-cvs
mailing list