Fix T54098: Crash existing /w dyntopo sculpt
[blender.git] / source / blender / editors / mesh / editmesh_undo.c
index 534ca22178eabfd1c9a5b6284d9395bb51fdde65..11667ed571051068361ed7c3ed4e1bf1b0340a51 100644 (file)
@@ -496,6 +496,8 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
 
        BM_mesh_bm_to_me(
                em->bm, &um->me, (&(struct BMeshToMeshParams){
+                   /* Undo code should not be manipulating 'G.main->object' hooks/vertex-parent. */
+                   .calc_object_remap = false,
                    .cd_mask_extra = CD_MASK_SHAPE_KEYINDEX,
                }));