From e1f38b21693af75abba757c0dd89249dc6ef2e39 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 3 Feb 2021 15:09:06 +0100 Subject: Fix incorrect mesh selection duplication in internal utility function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `BKE_mesh_new_nomain_from_template_ex()` would duplicate the mesh selection storage of the destination mesh to the destination mesh. Since that mesh was default initialized at this point, the selection was `NULL`, so the duplication call is essentially a no-op. Mistake in 7efc75c7092b. Differential Revision: https://developer.blender.org/D10009 Reviewed by: Sybren Stüvel --- source/blender/blenkernel/intern/mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 02588bf144e..622f6d7a7b8 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -941,7 +941,7 @@ Mesh *BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src, Mesh *me_dst = BKE_id_new_nomain(ID_ME, NULL); - me_dst->mselect = MEM_dupallocN(me_dst->mselect); + me_dst->mselect = MEM_dupallocN(me_src->mselect); me_dst->totvert = verts_len; me_dst->totedge = edges_len; -- cgit v1.2.3