Fix several cases of incorrect handling of CurrentMatch nullability

This commit is contained in:
Dean Herbert
2021-08-28 16:22:12 +09:00
parent 303c70791d
commit 6ef096001e
2 changed files with 2 additions and 2 deletions

View File

@ -20,6 +20,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
} }
private void matchChanged(ValueChangedEvent<TournamentMatch> match) => private void matchChanged(ValueChangedEvent<TournamentMatch> match) =>
Text.Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round"; Text.Text = match.NewValue?.Round.Value?.Name.Value ?? "Unknown Round";
} }
} }

View File

@ -164,7 +164,7 @@ namespace osu.Game.Tournament.Screens.Gameplay
{ {
if (state.NewValue == TourneyState.Ranking) if (state.NewValue == TourneyState.Ranking)
{ {
if (warmup.Value) return; if (warmup.Value || CurrentMatch.Value == null) return;
if (ipc.Score1.Value > ipc.Score2.Value) if (ipc.Score1.Value > ipc.Score2.Value)
CurrentMatch.Value.Team1Score.Value++; CurrentMatch.Value.Team1Score.Value++;