Make CalculatePerformanceAsync() nullable.

This commit is contained in:
Lucas A
2020-10-10 19:16:21 +02:00
parent 6459ce28a3
commit de522d53ea
2 changed files with 12 additions and 8 deletions

View File

@ -32,7 +32,11 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
else
{
performanceManager.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
.ContinueWith(t => Schedule(() => performance.Value = (int)t.Result), cancellationTokenSource.Token);
.ContinueWith(t => Schedule(() =>
{
if (t.Result.HasValue)
performance.Value = (int)t.Result.Value;
}), cancellationTokenSource.Token);
}
}