Fix T59519: Grease Pencil stroke with noise modifier crashes blender

The first point index was wrong calculated.
This commit is contained in:
Antonio Vazquez 2018-12-18 10:24:21 +01:00
parent 9c97170bba
commit c8e37f70dd
Notes: blender-bot 2023-06-21 19:23:24 +02:00
Referenced by issue #59519, Grease Pencil stroke with noise modifier crashes blender
1 changed files with 4 additions and 2 deletions

View File

@ -147,10 +147,12 @@ static void deformStroke(
pt1 = &gps->points[i - 1];
}
else {
int prev_idx = i - 1;
CLAMP_MIN(prev_idx, 0);
if (gps->dvert) {
dvert = &gps->dvert[i - 1];
dvert = &gps->dvert[prev_idx];
}
pt0 = &gps->points[i - 1];
pt0 = &gps->points[prev_idx];
pt1 = &gps->points[i];
}