From def2ef88b089b69b2f4e1884a916232101edc8ae Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 8 Jan 2015 12:47:19 +0100 Subject: Fix crash in texture paint sampling when sampling materials without textures slots --- source/blender/editors/sculpt_paint/paint_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 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; } -- cgit v1.2.3