From 9482f7445614907f001aee2097939d25ad6c0b92 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 30 Jul 2023 01:49:57 +0900 Subject: [PATCH] fix nullable for TeamList --- osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs b/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs index b2dd4e8c36..fc59b486fe 100644 --- a/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs +++ b/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs @@ -39,7 +39,7 @@ public partial class DrawingsScreen : TournamentScreen private Storage storage = null!; - public ITeamList? TeamList; + public ITeamList TeamList = null!; [BackgroundDependencyLoader] private void load(Storage storage) @@ -48,7 +48,8 @@ private void load(Storage storage) RelativeSizeAxes = Axes.Both; - TeamList ??= new StorageBackedTeamList(storage); + if (TeamList.IsNull()) + TeamList = new StorageBackedTeamList(storage); if (!TeamList.Teams.Any()) { @@ -223,7 +224,7 @@ private void reloadTeams() teamsContainer.ClearTeams(); allTeams.Clear(); - foreach (TournamentTeam t in TeamList.AsNonNull().Teams) + foreach (TournamentTeam t in TeamList.Teams) { if (groupsContainer.ContainsTeam(t.FullName.Value)) continue;