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 Howard Trickey
parent c6275da852
commit 12c66854bd
Notes: blender-bot 2023-02-14 06:27:47 +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 #95695, Blender 2.93 Crashes after using Boolean modifier
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

@ -386,7 +386,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;
}