Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-04-20 08:10:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-20 08:17:48 +0300
commit72fec0f7c5865a30aa348bc6e76271ba9a5a606e (patch)
treee7f04239b70da139996c570e0fc0dd7bf06601a0
parent0566ebdebeeb658300e6c45b805075ada9c02c0a (diff)
Fix T87055: Crash applying modifier on mesh with multires data
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index 385fd473e63..a4122dcca41 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -1634,6 +1634,10 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src,
if (totloop == mesh_dst->totloop) {
MDisps *mdisps = CustomData_get_layer(&mesh_dst->ldata, CD_MDISPS);
CustomData_add_layer(&tmp.ldata, CD_MDISPS, alloctype, mdisps, totloop);
+ if (alloctype == CD_ASSIGN) {
+ /* Assign NULL to prevent double-free. */
+ CustomData_set_layer(&mesh_dst->ldata, CD_MDISPS, NULL);
+ }
}
}