diff options
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index fc3c998ca1c..fc8292531dc 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -1055,6 +1055,14 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti if (totmapped == 0) { /* We are not allowed to distribute particles anywhere... */ + if (mesh != final_mesh) { + BKE_id_free(NULL, mesh); + } + BLI_kdtree_3d_free(tree); + BLI_rng_free(rng); + MEM_freeN(element_weight); + MEM_freeN(particle_element); + MEM_freeN(jitter_offset); return 0; } |