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
committerJeroen Bakker <jeroen@blender.org>2021-04-21 15:42:49 +0300
commitd35974cd870b0caf5292f1188bef10881685c480 (patch)
tree40b8db192792821face8da4db17218b46048c2b6
parent93472a2389901095d68fb0f6d9aa2431e044f95b (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 2b9a4b41549..12b5515748d 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -1540,6 +1540,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);
+ }
}
}