From 443cb9ff9efff2fe8d783cd2863635b48288e99e Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 31 Oct 2024 14:28:43 +0100 Subject: [PATCH] Fix #128945: Crash switching modes after duplicating particle system The particle system's mirror cache wasn't cleared on the new system, so it was freed twice when cleaning up all the particle edit mode data. --- source/blender/editors/physics/particle_object.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/physics/particle_object.cc b/source/blender/editors/physics/particle_object.cc index 30a85f672cd..dccd4c04cc7 100644 --- a/source/blender/editors/physics/particle_object.cc +++ b/source/blender/editors/physics/particle_object.cc @@ -1012,6 +1012,7 @@ static void copy_particle_edit(Depsgraph *depsgraph, psys->edit = edit; edit->pathcache = nullptr; + edit->mirror_cache = nullptr; BLI_listbase_clear(&edit->pathcachebufs); edit->emitter_field = nullptr;