Fix #105625: GPencil sculpt crash with subdivide modifier

The created point hasn't a original point in the original stroke, so
must use only the valid points.

Pull Request: https://projects.blender.org/blender/blender/pulls/105627
This commit is contained in:
Antonio Vazquez
2023-03-13 18:04:25 +01:00
committed by Antonio Vazquez
parent 69c6158cc8
commit ca2bf2f3a0

View File

@@ -1411,7 +1411,8 @@ static float gpencil_sculpt_rotation_eval_get(tGP_BrushEditData *gso,
const GP_SpaceConversion *gsc = &gso->gsc;
bGPDstroke *gps_orig = (gps_eval->runtime.gps_orig) ? gps_eval->runtime.gps_orig : gps_eval;
bGPDspoint *pt_orig = &gps_orig->points[pt_eval->runtime.idx_orig];
bGPDspoint *pt_orig = (pt_eval->runtime.pt_orig) ? &gps_orig->points[pt_eval->runtime.idx_orig] :
pt_eval;
bGPDspoint *pt_prev_eval = NULL;
bGPDspoint *pt_orig_prev = NULL;
if (idx_eval != 0) {