[Bf-blender-cvs] [4c4fa3d49bc] blender2.8: Fix double-free of custom data

Sybren A. Stüvel noreply at git.blender.org
Wed Jun 6 14:39:45 CEST 2018

Commit: 4c4fa3d49bc1988336620fd503d8b43d7885dbcb
Author: Sybren A. Stüvel
Date:   Wed Jun 6 14:37:30 2018 +0200
Branches: blender2.8

Fix double-free of custom data

This causes a temporary spike in memory usage when creating a copy; the
entire copy will be removed anyway when DerivedMesh is removed.


M	source/blender/blenkernel/intern/displist.c


diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 00ebf558f41..a591ab354f6 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1072,7 +1072,7 @@ static void curve_calc_modifiers_post(
 			/* XXX2.8(Sybren): make sure the face normals are recalculated as well */
-			(*r_dm_final) = CDDM_from_mesh(modified);
+			(*r_dm_final) = CDDM_from_mesh_ex(modified, CD_DUPLICATE, CD_MASK_MESH);
 			BKE_id_free(NULL, modified);
 		else {

More information about the Bf-blender-cvs mailing list