Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / particle_system.c
index 0fcc918a069fd027ccfa33bd7f67b39e2e6c9edb..8171f3e7812cb349c4c60d61118be530c03ebac2 100644 (file)
@@ -499,6 +499,8 @@ void psys_thread_context_free(ParticleThreadContext *ctx)
                MEM_freeN(ctx->vg_rough2);
        if (ctx->vg_roughe)
                MEM_freeN(ctx->vg_roughe);
+       if (ctx->vg_twist)
+               MEM_freeN(ctx->vg_twist);
 
        if (ctx->sim.psys->lattice_deform_data) {
                end_latt_deform(ctx->sim.psys->lattice_deform_data);
@@ -521,6 +523,9 @@ void psys_thread_context_free(ParticleThreadContext *ctx)
        if (ctx->roughcurve != NULL) {
                curvemapping_free(ctx->roughcurve);
        }
+       if (ctx->twistcurve != NULL) {
+               curvemapping_free(ctx->twistcurve);
+       }
 }
 
 static void initialize_particle_texture(ParticleSimulationData *sim, ParticleData *pa, int p)