diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-24 15:24:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-24 15:24:34 +0400 |
commit | e63c124e2bbb6725d513dd8e06795b8a9ec90139 (patch) | |
tree | b3ff778e633c1a8d46ffcf3ae449eee7e071df10 /source | |
parent | 8247bf6fa68bec20a76e613f77f3b49c3194ace8 (diff) |
fix [#28736] FaceMask crash on Weight Paint
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index bf4bd7f1d93..546e5ccba5d 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -517,10 +517,8 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot { Mesh *me = (Mesh*)userData; - if (me->mface) { - short matnr= me->mface[index].mat_nr; - Material *ma= me->mat[matnr]; - + if (me->mat && me->mface) { + Material *ma= me->mat[me->mface[index].mat_nr]; if (ma && (ma->game.flag & GEMAT_INVISIBLE)) { return 0; } |