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.
This commit is contained in:
Sybren A. Stüvel
2018-06-06 14:37:30 +02:00
parent 3b8ae85e3d
commit 4c4fa3d49b

View File

@@ -1072,7 +1072,7 @@ static void curve_calc_modifiers_post(
/* XXX2.8(Sybren): make sure the face normals are recalculated as well */
BKE_mesh_ensure_normals(modified);
(*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 {