Fix T58046: Crash when changing Particle type, when Hair has dynamics
thx @sergey for checking
This commit is contained in:
parent
999b466784
commit
41e4059f3c
Notes:
blender-bot
2023-11-20 12:14:32 +01:00
Referenced by issue #58046, Crash when changing Particle type, when Hair has dynamics
|
@ -469,6 +469,7 @@ void free_hair(Object *object, ParticleSystem *psys, int dynamics)
|
|||
if (psys->clmd) {
|
||||
if (dynamics) {
|
||||
modifier_free((ModifierData *)psys->clmd);
|
||||
psys->clmd = NULL;
|
||||
PTCacheID pid;
|
||||
BKE_ptcache_id_from_particles(&pid, object, psys);
|
||||
BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
|
||||
|
|
Loading…
Reference in New Issue