1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:17:27 +08:00

Make game dependency in ScreenEntry optional to unbreak tests

This commit is contained in:
Bartłomiej Dach 2024-02-02 06:53:17 +01:00
parent bb6387bea0
commit b58ac7950b
No known key found for this signature in database

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.AccountCreation
private GameHost? host { get; set; }
[Resolved]
private OsuGame game { get; set; } = null!;
private OsuGame? game { get; set; }
[BackgroundDependencyLoader]
private void load()
@ -208,7 +208,7 @@ namespace osu.Game.Overlays.AccountCreation
if (!string.IsNullOrEmpty(errors.Message))
passwordDescription.AddErrors(new[] { errors.Message });
game.OpenUrlExternally($"{errors.Redirect}?username={usernameTextBox.Text}&email={emailTextBox.Text}", true);
game?.OpenUrlExternally($"{errors.Redirect}?username={usernameTextBox.Text}&email={emailTextBox.Text}", true);
}
}
else