Fix #114552: Copy material to selected crash on object lacking slot #119161

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:114552 into blender-v4.1-release 2024-03-07 15:43:57 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -1249,7 +1249,7 @@ void BKE_object_material_array_assign(
/* now we have the right number of slots */
for (int i = 0; i < totcol; i++) {
if (to_object_only && ob->matbits[i] == 0) {
if (to_object_only && ob->matbits && ob->matbits[i] == 0) {
/* If we only assign to object, and that slot uses obdata material, do nothing. */
continue;
}