diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-03 02:22:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-03 02:22:29 +0400 |
commit | 4fcd8b64da9309b668fe5d31fa6f0c1727dc3a42 (patch) | |
tree | ee8ec1803e0822717321a5be4e1d17ec157ceea7 /source/blender/editors/sculpt_paint | |
parent | 1cee3e53fc9e5d056c3b5f37d3ec19105a0cfeed (diff) |
Code Cleanup: remove redundant/misleading NULL checks
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 7e598ff788b..7d62ca0535d 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2366,12 +2366,13 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P else totindex = 0; } - if (use_face_sel && me->mpoly) { + if (use_face_sel && me->totpoly) { + MPoly *mpoly = me->mpoly; for (index = 0; index < totindex; index++) { if (indexar[index] && indexar[index] <= me->totpoly) { - MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1); + MPoly *mp = &mpoly[indexar[index] - 1]; - if ((mpoly->flag & ME_FACE_SEL) == 0) { + if ((mp->flag & ME_FACE_SEL) == 0) { indexar[index] = 0; } } |