Cycles: Prevent crash in special cases when object has less slots than mesh
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 23 Sep 2016 13:57:39 +0000 (15:57 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 26 Sep 2016 08:51:51 +0000 (10:51 +0200)
commitdaa1487425b105dbe74c2e784ca52ea03ed7d874
treed1a5e56794d05809f6c94392a5047ae7c12077e5
parentabc8810911c77ee57a9134dd4e015c6bc182bfe7
Cycles: Prevent crash in special cases when object has less slots than mesh

This is something what was guaranteed in give_current_material(), just
copied some range checking logic from there.

Not sure what would be a proper fix here tho.
source/blender/blenkernel/intern/mesh.c