diff options
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 8ccdb8a3223..574d4580350 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1393,9 +1393,16 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma) } } } + else { + ma->paint_active_slot = 0; + ma->paint_clone_slot = 0; + return; + } + ma->tot_slots = count; + if (ma->paint_active_slot >= count) { ma->paint_active_slot = count - 1; } |