diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-01-04 12:48:52 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-01-04 13:29:47 +0300 |
commit | 5e38384034650f75e382366a312099c2544386ae (patch) | |
tree | 58d9f8a36f665dccab139cb0a60c6ff923bd6207 | |
parent | c7085be6c6ba2f7415b5b69f451287456296a3b6 (diff) |
Fix T84362: Crash when use Vertex Paint in subdivide strokes
Maniphest Tasks: T84362
Differential Revision: https://developer.blender.org/D9983
-rw-r--r-- | source/blender/editors/gpencil/gpencil_vertex_paint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 3afff897734..62ddfaab012 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -908,14 +908,14 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, /* To each point individually... */ pt = &gps->points[i]; - pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i; + pt_active = pt->runtime.pt_orig; if (pt_active != NULL) { /* If masked and the point is not selected, skip it. */ if ((GPENCIL_ANY_VERTEX_MASK(gso->mask)) && ((pt_active->flag & GP_SPOINT_SELECT) == 0)) { continue; } + index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i; hit = true; gpencil_save_selected_point(gso, gps_active, index, pc1); saved = true; @@ -931,9 +931,9 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, */ if (i + 1 == gps->totpoints - 1) { pt = &gps->points[i + 1]; - pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i + 1; + pt_active = pt->runtime.pt_orig; if (pt_active != NULL) { + index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i + 1; hit = true; gpencil_save_selected_point(gso, gps_active, index, pc2); include_last = false; @@ -951,9 +951,9 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, * (but wasn't added then, to avoid double-ups). */ pt = &gps->points[i]; - pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i; + pt_active = pt->runtime.pt_orig; if (pt_active != NULL) { + index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i; hit = true; gpencil_save_selected_point(gso, gps_active, index, pc1); include_last = false; |