Add null checks to unguarded resolved-as-null fields

This commit is contained in:
Bartłomiej Dach
2020-11-14 14:48:48 +01:00
parent aae59dc3cf
commit 610ed99ae3
11 changed files with 24 additions and 13 deletions

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.AccountCreation
public override void OnEntering(IScreen last)
{
if (string.IsNullOrEmpty(api.ProvidedUsername))
if (string.IsNullOrEmpty(api?.ProvidedUsername))
{
this.FadeOut();
this.Push(new ScreenEntry());
@ -43,7 +43,7 @@ namespace osu.Game.Overlays.AccountCreation
[BackgroundDependencyLoader(true)]
private void load(OsuColour colours, OsuGame game, TextureStore textures)
{
if (string.IsNullOrEmpty(api.ProvidedUsername))
if (string.IsNullOrEmpty(api?.ProvidedUsername))
return;
InternalChildren = new Drawable[]