diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-01-08 14:47:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-20 12:18:21 +0300 |
commit | 1d0c23823d743184aa2bf424d1df0146407d86b1 (patch) | |
tree | dd5c2d720191e72865cbee19628c4254ac9248ac | |
parent | a1a182c2684a7f050f6a85820e183c31ff117e82 (diff) |
Fix crash in texture paint sampling when sampling materials without
textures slots
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 12e7e811355..427505bbe3e 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -395,7 +395,7 @@ static Image *imapaint_face_image(DerivedMesh *dm, int face_index) Image *ima; MFace *mf = dm->getTessFaceArray(dm) + face_index; Material *ma = dm->mat[mf->mat_nr]; - ima = ma ? ma->texpaintslot[ma->paint_active_slot].ima : NULL; + ima = ma && ma->texpaintslot ? ma->texpaintslot[ma->paint_active_slot].ima : NULL; return ima; } |