mirror of https://github.com/ppy/osu
Throw if a null `BeatmapInfo` arrives during score import process
This commit is contained in:
parent
e2ddcb2349
commit
5947c2b298
|
@ -98,10 +98,12 @@ protected override void Populate(ScoreInfo model, ArchiveReader? archive, Realm
|
|||
/// <param name="score">The score to populate the statistics of.</param>
|
||||
public void PopulateMaximumStatistics(ScoreInfo score)
|
||||
{
|
||||
Debug.Assert(score.BeatmapInfo != null);
|
||||
|
||||
if (score.MaximumStatistics.Select(kvp => kvp.Value).Sum() > 0)
|
||||
return;
|
||||
|
||||
var beatmap = score.BeatmapInfo?.Detach();
|
||||
var beatmap = score.BeatmapInfo!.Detach();
|
||||
var ruleset = score.Ruleset.Detach();
|
||||
var rulesetInstance = ruleset.CreateInstance();
|
||||
|
||||
|
|
Loading…
Reference in New Issue