Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-03 02:22:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-03 02:22:29 +0400
commit4fcd8b64da9309b668fe5d31fa6f0c1727dc3a42 (patch)
treeee8ec1803e0822717321a5be4e1d17ec157ceea7 /source/blender/editors
parent1cee3e53fc9e5d056c3b5f37d3ec19105a0cfeed (diff)
Code Cleanup: remove redundant/misleading NULL checks
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c7
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;
}
}