Support null leaderboard position

This commit is contained in:
smoogipoo
2020-02-20 14:51:25 +09:00
parent 0cf0099fd5
commit 1a689231c2
4 changed files with 36 additions and 5 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -70,7 +71,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
topScoresContainer.Add(new DrawableTopScore(topScore));
if (userScoreInfo != null && userScoreInfo.OnlineScoreID != topScore.OnlineScoreID)
topScoresContainer.Add(new DrawableTopScore(userScoreInfo, userScore.Position));
{
Debug.Assert(userScore.Position != null);
topScoresContainer.Add(new DrawableTopScore(userScoreInfo, userScore.Position.Value));
}
});
}