GPencil: Fix error when stroke has 0 points

It's possible create a stroke with 0 points using python
This commit is contained in:
Antonio Vazquez 2020-03-28 12:33:32 +01:00
parent bdec24b40d
commit 7dbf7255c2
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}
}