diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-03 16:23:55 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-03 16:23:55 +0300 |
commit | 04d35f9315065745a53423fd3c694582c6cd3420 (patch) | |
tree | 41c15837510ca82959a0442562b164f3ac07d6e5 | |
parent | 3532da44ee2f2d1e1e169da3eacd081a3ce67308 (diff) | |
parent | f81190f85f65b292a0f0dfaa0a8d5b0f7fd72c58 (diff) |
Merge branch 'blender-v3.0-release'
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 070470b3734..3e9f22f25d3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1582,10 +1582,12 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p, */ if (gpencil_stroke_inside_circle(mval, radius, pc0[0], pc0[1], pc2[0], pc2[1])) { - bool is_occluded_pt0, is_occluded_pt1, is_occluded_pt2 = true; - is_occluded_pt0 = (pt0 && ((pt0->flag & GP_SPOINT_TEMP_TAG) != 0)) ? - ((pt0->flag & GP_SPOINT_TEMP_TAG2) != 0) : - gpencil_stroke_eraser_is_occluded(p, gpl, pt0, pc0[0], pc0[1]); + bool is_occluded_pt0 = true, is_occluded_pt1 = true, is_occluded_pt2 = true; + if (pt0) { + is_occluded_pt0 = ((pt0->flag & GP_SPOINT_TEMP_TAG) != 0) ? + ((pt0->flag & GP_SPOINT_TEMP_TAG2) != 0) : + gpencil_stroke_eraser_is_occluded(p, gpl, pt0, pc0[0], pc0[1]); + } if (is_occluded_pt0) { is_occluded_pt1 = ((pt1->flag & GP_SPOINT_TEMP_TAG) != 0) ? ((pt1->flag & GP_SPOINT_TEMP_TAG2) != 0) : |