Fix for [#25572] crash when changing vertex group density in particle mode
authorJanne Karhu <jhkarh@gmail.com>
Wed, 12 Jan 2011 10:01:33 +0000 (10:01 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Wed, 12 Jan 2011 10:01:33 +0000 (10:01 +0000)
* Hair was freed & redone on changes, but particle mode data wasn't updated.

source/blender/blenkernel/intern/particle_system.c

index 27adeaa243063b5ecfdb243823f68a6f17516064..06056e0ecc9e1c41399b79f6cbebc0222aa8ee74 100644 (file)
@@ -4100,6 +4100,12 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
 
                                free_hair(ob, psys, 0);
 
+                               if(psys->edit && psys->free_edit) {
+                                       psys->free_edit(psys->edit);
+                                       psys->edit = NULL;
+                                       psys->free_edit = NULL;
+                               }
+
                                /* first step is negative so particles get killed and reset */
                                psys->cfra= 1.0f;