1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 18:23:21 +08:00

Fix visual test crashes due to local realm not having update thread

This commit is contained in:
Dean Herbert 2022-03-25 16:35:32 +09:00
parent 8553adc401
commit 5fcd3b07f1

View File

@ -115,11 +115,13 @@ namespace osu.Game.Tests.Visual
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
headlessHostStorage = (parent.Get<GameHost>() as HeadlessGameHost)?.Storage;
var host = parent.Get<GameHost>();
headlessHostStorage = (host as HeadlessGameHost)?.Storage;
Resources = parent.Get<OsuGameBase>().Resources;
realm = new Lazy<RealmAccess>(() => new RealmAccess(LocalStorage, "client"));
realm = new Lazy<RealmAccess>(() => new RealmAccess(LocalStorage, "client", host.UpdateThread));
RecycleLocalStorage(false);