Fix T87055: Crash applying modifier on mesh with multires data
This commit is contained in:
parent
0566ebdebe
commit
72fec0f7c5
Notes:
blender-bot
2023-02-14 08:08:54 +01:00
Referenced by issue #87055, Applying a mirror modifier with bisect enabled on object with a multires modifier prevents saving file and crashes blender afterwards Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue