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:
Lukas Toenne
2013-08-13 06:21:39 +00:00
parent 730b9c283e
commit 3e954e95a6

View File

@@ -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;