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:
Diffstat (limited to 'source/blender/draw/modes/paint_texture_mode.c')
-rw-r--r--source/blender/draw/modes/paint_texture_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c
index a89616c2cae..200daf66c83 100644
--- a/source/blender/draw/modes/paint_texture_mode.c
+++ b/source/blender/draw/modes/paint_texture_mode.c
@@ -282,7 +282,7 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob)
for (int i = 0; i < mat_nr; i++) {
const int index = use_material_slots ? i : 0;
- if (stl->g_data->shgroup_image_array[index]) {
+ if ((i < me->totcol) && stl->g_data->shgroup_image_array[index]) {
DRW_shgroup_call_add(stl->g_data->shgroup_image_array[index], geom_array[i], ob->obmat);
}
else {