1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Move host lookup to inside lazy retrieval to handle edge cases

This commit is contained in:
Dean Herbert 2020-09-15 14:25:31 +09:00
parent 234152b2fe
commit 879979ef57

View File

@ -132,9 +132,8 @@ namespace osu.Game.Tests.Visual
}
}
localStorage = host is HeadlessGameHost
? new Lazy<Storage>(() => host.Storage)
: new Lazy<Storage>(() => new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}")));
localStorage =
new Lazy<Storage>(() => host is HeadlessGameHost ? host.Storage : new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}")));
}
[Resolved]