Fix #33916: 2.65a regression: particles duplicating objects with halo - crash
allow_render_dupli_instance used to pass zero-based index to give_current_material which is wrong. Before rev53332 it wasn't so much visible because give_current_material used to clamp index internally. But that was wrong behavior here anyway, and why nobody noticed this for so long? :)
This commit is contained in:
@@ -4769,7 +4769,7 @@ static int allow_render_dupli_instance(Render *UNUSED(re), DupliObject *dob, Obj
|
||||
|
||||
if (totmaterial) {
|
||||
for (a= 0; a<*totmaterial; a++) {
|
||||
ma= give_current_material(obd, a);
|
||||
ma= give_current_material(obd, a + 1);
|
||||
if (ma && (ma->material_type == MA_TYPE_HALO))
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user