1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Fix potential nullref

This commit is contained in:
smoogipoo 2019-06-13 18:43:51 +09:00
parent f9f32311b7
commit 6b615d763a

View File

@ -37,8 +37,8 @@ namespace osu.Game.Overlays.BeatmapSet
private void updateDisplay()
{
int passCount = beatmap?.OnlineInfo.PassCount ?? 0;
int playCount = beatmap?.OnlineInfo.PlayCount ?? 0;
int passCount = beatmap?.OnlineInfo?.PassCount ?? 0;
int playCount = beatmap?.OnlineInfo?.PlayCount ?? 0;
var rate = playCount != 0 ? (float)passCount / playCount : 0;
successPercent.Text = rate.ToString("P0");