fix for crash when deleting duplictaed objects with particle systems
authorCampbell Barton <ideasman42@gmail.com>
Thu, 4 Feb 2010 09:59:05 +0000 (09:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 4 Feb 2010 09:59:05 +0000 (09:59 +0000)
cloth modifier was copied but not assigned to the new psys.

source/blender/blenkernel/intern/object.c

index 42fe565f1bb2f7fb555936e24367da935332ec04..0baf9b00ecf1f7abfd15e7f9c3ebbef790722d37 100644 (file)
@@ -1145,8 +1145,8 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
        }
 
        if(psys->clmd) {
-               ClothModifierData *nclmd = (ClothModifierData *)modifier_new(eModifierType_Cloth);
-               modifier_copyData((ModifierData*)psys->clmd, (ModifierData*)nclmd);
+               psysn->clmd = (ClothModifierData *)modifier_new(eModifierType_Cloth);
+               modifier_copyData((ModifierData*)psys->clmd, (ModifierData*)psysn->clmd);
                psys->hair_in_dm = psys->hair_out_dm = NULL;
        }