[Bf-blender-cvs] [f823ea1] master: Solve another case of invalid indices.
Antony Riakiotakis
noreply at git.blender.org
Thu Aug 28 23:27:13 CEST 2014
Commit: f823ea1ac43f9e837b522aedb3e98cc52c3c38b7
Author: Antony Riakiotakis
Date: Thu Aug 28 23:26:52 2014 +0200
Branches: master
https://developer.blender.org/rBf823ea1ac43f9e837b522aedb3e98cc52c3c38b7
Solve another case of invalid indices.
===================================================================
M source/blender/blenkernel/intern/material.c
===================================================================
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 8ccdb8a..574d458 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;
}
More information about the Bf-blender-cvs
mailing list