Fix for [#20294] Switching to particle mode after changing number of hair particles causes blender to crash.

* Particle edit mode wasn't freed when the particle amount was changed.
This commit is contained in:
2009-12-26 00:17:54 +00:00
parent 266271d65a
commit 7a19832a78

View File

@@ -170,6 +170,12 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
PARTICLE_P;
int totpart, totsaved = 0;
if(psys->edit && psys->free_edit) {
psys->free_edit(psys->edit);
psys->edit = NULL;
psys->free_edit = NULL;
}
if(new_totpart<0) {
if(part->distr==PART_DISTR_GRID && part->from != PART_FROM_VERT) {
totpart= part->grid_res;