Fix for bug #8920: particles reactor crash and memory leak.

This commit is contained in:
2008-04-11 12:29:29 +00:00
parent 716f400182
commit a02937d86c
4 changed files with 28 additions and 9 deletions

View File

@@ -2204,10 +2204,13 @@ void pointcache_free(PTCacheID *pid, int cacheonly)
ListBase pidlist;
if(pid) {
if(cacheonly)
if(cacheonly) {
BKE_ptcache_id_reset(pid, PTCACHE_RESET_DEPSGRAPH);
else
}
else {
BKE_ptcache_id_reset(pid, PTCACHE_RESET_BAKED);
pid->cache->flag &= ~PTCACHE_BAKED;
}
DAG_object_flush_update(G.scene, pid->ob, OB_RECALC_DATA);
}
@@ -2217,10 +2220,13 @@ void pointcache_free(PTCacheID *pid, int cacheonly)
BKE_ptcache_ids_from_object(&pidlist, base->object);
for(pid=pidlist.first; pid; pid=pid->next) {
if(cacheonly)
if(cacheonly) {
BKE_ptcache_id_reset(pid, PTCACHE_RESET_DEPSGRAPH);
else
}
else {
BKE_ptcache_id_reset(pid, PTCACHE_RESET_BAKED);
pid->cache->flag &= ~PTCACHE_BAKED;
}
DAG_object_flush_update(G.scene, pid->ob, OB_RECALC_DATA);
}