Ugh, yet another try to fix [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render.
Hopefully it's now fixed for good.
This commit is contained in:
@@ -351,8 +351,18 @@ void free_hair(ParticleSystem *psys, int softbody)
|
||||
}
|
||||
void free_keyed_keys(ParticleSystem *psys)
|
||||
{
|
||||
if(psys->particles && psys->particles->keys)
|
||||
ParticleData *pa;
|
||||
int i;
|
||||
|
||||
if(psys->particles && psys->particles->keys) {
|
||||
MEM_freeN(psys->particles->keys);
|
||||
|
||||
for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++)
|
||||
if(pa->keys) {
|
||||
pa->keys= NULL;
|
||||
pa->totkey= 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
void free_child_path_cache(ParticleSystem *psys)
|
||||
{
|
||||
|
||||
@@ -203,7 +203,7 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
|
||||
if(psys->particles->keys)
|
||||
MEM_freeN(psys->particles->keys);
|
||||
|
||||
for(i=totsaved, pa=psys->particles+totsaved; i<psys->totpart; i++, pa++)
|
||||
for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++)
|
||||
if(pa->keys) {
|
||||
pa->keys= NULL;
|
||||
pa->totkey= 0;
|
||||
|
||||
Reference in New Issue
Block a user