Simulation: fix memory leak

This commit is contained in:
Jacques Lucke 2020-07-18 10:06:36 +02:00
parent 1dd381828f
commit 63db971a00
1 changed files with 4 additions and 0 deletions

View File

@ -3850,6 +3850,10 @@ static void write_simulation(BlendWriter *writer, Simulation *simulation, const
layers,
CD_MASK_ALL);
if (layers != NULL && layers != layers_buff) {
MEM_freeN(layers);
}
write_pointcaches(writer, &particle_state->ptcaches);
break;
}