1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 05:53:10 +08:00

Don't calculate performance if difficulty attributes aren't locally computable.

This commit is contained in:
Lucas A 2020-10-09 18:32:03 +02:00
parent fa201be2ad
commit 6459ce28a3

View File

@ -43,6 +43,10 @@ namespace osu.Game.Scoring
{
var attributes = await difficultyManager.GetDifficultyAsync(score.Beatmap, score.Ruleset, score.Mods, token);
// Performance calculation requires the beatmap and ruleset to be locally available. If not, return a default value.
if (attributes.Attributes == null)
return default;
if (token.IsCancellationRequested)
return default;