mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix hard crash when opening beatmap with zero playcount in beatmap overlay
This commit is contained in:
@ -29,7 +29,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
if (value == beatmap) return;
|
||||
beatmap = value;
|
||||
|
||||
var rate = (float)beatmap.OnlineInfo.PassCount / beatmap.OnlineInfo.PlayCount;
|
||||
int passCount = beatmap.OnlineInfo.PassCount;
|
||||
int playCount = beatmap.OnlineInfo.PlayCount;
|
||||
|
||||
var rate = (playCount != 0) ? (float)passCount / playCount : 0;
|
||||
successPercent.Text = rate.ToString("P0");
|
||||
successRate.Length = rate;
|
||||
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
|
||||
|
Reference in New Issue
Block a user