Fix for unfreed memory of internal hair cloth modifier pointcache.

This commit is contained in:
Lukas Tönne
2015-02-02 12:51:22 +01:00
parent 5030daf2a8
commit 961b7e78b4

View File

@@ -414,8 +414,7 @@ void free_hair(Object *UNUSED(ob), ParticleSystem *psys, int dynamics)
if (psys->clmd) { if (psys->clmd) {
if (dynamics) { if (dynamics) {
BKE_ptcache_free_list(&psys->ptcaches); BKE_ptcache_free_list(&psys->ptcaches);
psys->clmd->point_cache = psys->pointcache = NULL; psys->pointcache = NULL;
BLI_listbase_clear(&psys->clmd->ptcaches);
modifier_free((ModifierData *)psys->clmd); modifier_free((ModifierData *)psys->clmd);