mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 10:22:54 +08:00
Throw if a null BeatmapInfo
arrives during score import process
This commit is contained in:
parent
e2ddcb2349
commit
5947c2b298
@ -98,10 +98,12 @@ namespace osu.Game.Scoring
|
|||||||
/// <param name="score">The score to populate the statistics of.</param>
|
/// <param name="score">The score to populate the statistics of.</param>
|
||||||
public void PopulateMaximumStatistics(ScoreInfo score)
|
public void PopulateMaximumStatistics(ScoreInfo score)
|
||||||
{
|
{
|
||||||
|
Debug.Assert(score.BeatmapInfo != null);
|
||||||
|
|
||||||
if (score.MaximumStatistics.Select(kvp => kvp.Value).Sum() > 0)
|
if (score.MaximumStatistics.Select(kvp => kvp.Value).Sum() > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var beatmap = score.BeatmapInfo?.Detach();
|
var beatmap = score.BeatmapInfo!.Detach();
|
||||||
var ruleset = score.Ruleset.Detach();
|
var ruleset = score.Ruleset.Detach();
|
||||||
var rulesetInstance = ruleset.CreateInstance();
|
var rulesetInstance = ruleset.CreateInstance();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user