Bugfix for particle adding + mirror crash.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 12 Dec 2007 17:01:46 +0000 (17:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 12 Dec 2007 17:01:46 +0000 (17:01 +0000)
source/blender/src/editparticle.c

index 411a45d0a538875326123e664fb69be681cb476e..a2823a0855b15c4355df56a209684f0ef55ab0d7 100644 (file)
@@ -600,11 +600,11 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
        edit= psys->edit;
        i= pa - psys->particles;
 
-       if(!edit->mirror_cache)
-               PE_update_mirror_cache(ob, psys);
-
        /* find mirrored particle if needed */
        if(!mpa) {
+               if(!edit->mirror_cache)
+                       PE_update_mirror_cache(ob, psys);
+
                mi= edit->mirror_cache[i];
                if(mi == -1)
                        return;