mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Fix potential nullref
This commit is contained in:
parent
f9f32311b7
commit
6b615d763a
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user