added a null check for give_matarar with make_local, was crashing with some data

This commit is contained in:
2007-03-20 16:54:31 +00:00
parent e706ce0228
commit cbadf6523c

View File

@@ -4562,11 +4562,12 @@ void make_local(int mode)
}
matarar= (Material ***)give_matarar(ob);
for(a=0; a<ob->totcol; a++) {
ma= (*matarar)[a];
if(ma)
make_local_makelocalmaterial(ma);
if (matarar) {
for(a=0; a<ob->totcol; a++) {
ma= (*matarar)[a];
if(ma)
make_local_makelocalmaterial(ma);
}
}
}
}