diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-01-08 14:47:19 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-01-08 14:47:19 +0300 |
commit | def2ef88b089b69b2f4e1884a916232101edc8ae (patch) | |
tree | 6da9585bb8040361f7824e64ee34837267ae7398 | |
parent | acce9f0841e9b944ac881868d3a5237bda2f9e0e (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; } |