Pass correct array size to BKE_object_material_remap_calc

This was patch D12460 from jlewallen and fixes T91339 and T90818.
This commit is contained in:
Jacob Lewallen 2021-10-06 10:23:10 -04:00 committed by Philipp Oeser
parent 852d10bd3d
commit 7d2b6a213f
Notes: blender-bot 2023-02-13 17:52:29 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #91339, Crash on Boolean modifier when ob_src->totcol > ob_dst->totcol
Referenced by issue #90818, Crash to desktop with boolean modifier
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ static void BMD_mesh_intersection(BMesh *bm,
* Caller owns the returned array. */
static Array<short> get_material_remap(Object *dest_ob, Object *src_ob)
{
int n = dest_ob->totcol;
int n = src_ob->totcol;
if (n <= 0) {
n = 1;
}