Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-01-08 14:47:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-20 12:18:21 +0300
commit1d0c23823d743184aa2bf424d1df0146407d86b1 (patch)
treedd5c2d720191e72865cbee19628c4254ac9248ac
parenta1a182c2684a7f050f6a85820e183c31ff117e82 (diff)
Fix crash in texture paint sampling when sampling materials without
textures slots
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c2
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;
}