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.
This commit is contained in:
Antonio Vazquez
2022-09-05 17:08:23 +02:00
parent ffe4840c2b
commit 191872a836

View File

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