Fix #36451, Particle system crashes blender. The psys_render_restore function was accessing the psys->frand random number array, but since the particle modifier is disabled this array does not get
initialized. Added a sanity check to skip disabled particle systems in BI render. (why wasn't this done before?)
This commit is contained in:
@@ -4817,6 +4817,9 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
|
||||
if (ob->particlesystem.first) {
|
||||
psysindex= 1;
|
||||
for (psys=ob->particlesystem.first; psys; psys=psys->next, psysindex++) {
|
||||
if (!psys_check_enabled(ob, psys))
|
||||
continue;
|
||||
|
||||
obr= RE_addRenderObject(re, ob, par, index, psysindex, ob->lay);
|
||||
if ((dob && !dob->animated) || (ob->transflag & OB_RENDER_DUPLI)) {
|
||||
obr->flag |= R_INSTANCEABLE;
|
||||
|
||||
Reference in New Issue
Block a user