Commit: def2ef88b089b69b2f4e1884a916232101edc8ae
Author: Antony Riakiotakis
Date:   Thu Jan 8 12:47:19 2015 +0100
Branches: master
https://developer.blender.org/rBdef2ef88b089b69b2f4e1884a916232101edc8ae

Fix crash in texture paint sampling when sampling materials without
textures slots

===================================================================

M       source/blender/editors/sculpt_paint/paint_utils.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_utils.c 
b/source/blender/editors/sculpt_paint/paint_utils.c
index 12e7e81..427505b 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;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to