Skip to content

Commit

Permalink
Merge pull request #4161 from WilliamQiufeng/fix-tournament-players-n…
Browse files Browse the repository at this point in the history
…ullref

Initialize TournamentScreenView.TournamentPlayers before the guard in TournamentScreenView.CreateOverlay to avoid NullReferenceException
  • Loading branch information
AiAe committed Jun 1, 2024
2 parents 2702872 + 3f988f8 commit ab19485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Quaver.Shared/Screens/Tournament/TournamentScreenView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ private void CreateUsernames()
/// </summary>
private void CreateOverlay()
{
TournamentPlayers = new List<TournamentPlayer>();

if (TournamentScreen.GameplayScreens.Count > 2 || !ConfigManager.Display1v1TournamentOverlay.Value)
return;

TournamentPlayers = new List<TournamentPlayer>();

// Create overlay for spectator
if (OnlineManager.CurrentGame != null)
{
Expand Down

0 comments on commit ab19485

Please sign in to comment.