diff --git a/src/terrain_3d_instancer.cpp b/src/terrain_3d_instancer.cpp index d6ac6d102..4b705f94d 100644 --- a/src/terrain_3d_instancer.cpp +++ b/src/terrain_3d_instancer.cpp @@ -573,6 +573,7 @@ void Terrain3DInstancer::remove_instances(const Vector3 &p_global_position, cons MultiMeshInstance3D *mmi = cast_to(mesh_mmis[cell]); remove_from_tree(mmi); memdelete_safely(mmi); + mesh_mmis.erase(cell); } cells_dict.erase(cell); }