Merge remote-tracking branch 'origin/master' into blender2.8
[blender.git] / source / blender / modifiers / intern / MOD_surfacedeform.c
index f6288dc9be00eaa3ae3fd3b7fb90e9cfde2d69b9..9339d71524fe4cc229564851abad5d79fb9d4e5a 100644 (file)
@@ -136,7 +136,9 @@ static void copyData(ModifierData *md, ModifierData *target)
        SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
        SurfaceDeformModifierData *tsmd = (SurfaceDeformModifierData *)target;
 
-       *tsmd = *smd;
+       freeData(target);
+
+       modifier_copyData_generic(md, target);
 
        if (smd->verts) {
                tsmd->verts = MEM_dupallocN(smd->verts);