mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Handle the case where a map hasn't been rated yet
This commit is contained in:
parent
2bd425d64f
commit
dbb03bcff2
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Select.Details
|
||||
|
||||
negativeRatings.Text = negativeCount.ToString();
|
||||
positiveRatings.Text = (totalCount - negativeCount).ToString();
|
||||
ratingsBar.Length = (float)negativeCount / totalCount;
|
||||
ratingsBar.Length = totalCount == 0 ? 0 : (float)negativeCount / totalCount;
|
||||
graph.Values = ratings.GetRange(0, rating_range).Select(r => (float)r);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user