From 879979ef57f4b8139c1f37d117f2229d84f3d45b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 15 Sep 2020 14:25:31 +0900 Subject: [PATCH] Move host lookup to inside lazy retrieval to handle edge cases --- osu.Game/Tests/Visual/OsuTestScene.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game/Tests/Visual/OsuTestScene.cs b/osu.Game/Tests/Visual/OsuTestScene.cs index 6286809595..611bc8f30f 100644 --- a/osu.Game/Tests/Visual/OsuTestScene.cs +++ b/osu.Game/Tests/Visual/OsuTestScene.cs @@ -132,9 +132,8 @@ namespace osu.Game.Tests.Visual } } - localStorage = host is HeadlessGameHost - ? new Lazy(() => host.Storage) - : new Lazy(() => new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}"))); + localStorage = + new Lazy(() => host is HeadlessGameHost ? host.Storage : new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}"))); } [Resolved]