diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-07 14:04:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-07 14:04:07 +0400 |
commit | 8a4fe62843f8aa311226f543d14bd3e5440ffe7d (patch) | |
tree | c8dc58cda87f525acb567796c80164ef3a8f8050 /source/blender/editors/space_view3d/drawmesh.c | |
parent | c9453b1357dcb878dff6efc9dd3597452d6dc762 (diff) |
misc fixes found with clang's static checker.
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 7a7462433d7..cf511a8ad9b 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -536,12 +536,13 @@ static int draw_em_tf_mapped__set_draw(void *userData, int index) static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r) { Mesh *me = (Mesh*)userData; - MTFace *tface = (me->mtface)? &me->mtface[index]: NULL; - MFace *mface = (me->mface)? &me->mface[index]: NULL; - - if ((mface->flag&ME_HIDE) || (tface && (tface->mode&TF_INVISIBLE))) - return 0; - + + if ( (me->mface && me->mface[index].flag & ME_HIDE) || + (me->mtface && (me->mtface[index].mode & TF_INVISIBLE)) + ) { + return 0; + } + *drawSmooth_r = 1; return 1; } |