1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Allow loginOverlay to be null if there's no cached instance in DI (for testing cases)

This commit is contained in:
Lucas A 2019-04-06 18:52:30 +02:00
parent 394f14965b
commit 3f2e6a9376

View File

@ -103,7 +103,7 @@ namespace osu.Game.Screens.Menu
[Resolved(CanBeNull = true)]
private NotificationOverlay notifications { get; set; }
[Resolved]
[Resolved(CanBeNull = true)]
private LoginOverlay loginOverlay { get; set; }
[BackgroundDependencyLoader(true)]
@ -141,7 +141,7 @@ namespace osu.Game.Screens.Menu
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{
loginOverlay.Show();
loginOverlay?.Show();
return true;
}
});