From 5fcd3b07f1352601ec8970a891f431f9d70433f6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 25 Mar 2022 16:35:32 +0900 Subject: [PATCH] Fix visual test crashes due to local realm not having update thread --- osu.Game/Tests/Visual/OsuTestScene.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Tests/Visual/OsuTestScene.cs b/osu.Game/Tests/Visual/OsuTestScene.cs index f287a04d71..6c332c2408 100644 --- a/osu.Game/Tests/Visual/OsuTestScene.cs +++ b/osu.Game/Tests/Visual/OsuTestScene.cs @@ -115,11 +115,13 @@ namespace osu.Game.Tests.Visual protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) { - headlessHostStorage = (parent.Get() as HeadlessGameHost)?.Storage; + var host = parent.Get(); + + headlessHostStorage = (host as HeadlessGameHost)?.Storage; Resources = parent.Get().Resources; - realm = new Lazy(() => new RealmAccess(LocalStorage, "client")); + realm = new Lazy(() => new RealmAccess(LocalStorage, "client", host.UpdateThread)); RecycleLocalStorage(false);