Fix T54098: Crash existing /w dyntopo sculpt
[blender.git] / source / blender / blenkernel / intern / scene.c
index 126761ed14bc17b4080815f9c852f3304be1847e..423ed2af057ad698dd211b4d7216d54ca3afb9d7 100644 (file)
@@ -1851,7 +1851,11 @@ static void prepare_mesh_for_viewport_render(Main *bmain, Scene *scene)
                {
                        if (check_rendered_viewport_visible(bmain)) {
                                BMesh *bm = mesh->edit_btmesh->bm;
-                               BM_mesh_bm_to_me(bm, mesh, (&(struct BMeshToMeshParams){0}));
+                               BM_mesh_bm_to_me(
+                                       bm, mesh,
+                                       (&(struct BMeshToMeshParams){
+                                           .calc_object_remap = true,
+                                       }));
                                DAG_id_tag_update(&mesh->id, 0);
                        }
                }