mirror of
https://github.com/ppy/osu
synced 2025-03-31 23:58:37 +00:00
Fix potential read from empty queue in SPM counter
This commit is contained in:
parent
818cbc0082
commit
1b031ca328
@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
if (records.Count > 0)
|
||||
{
|
||||
var record = records.Peek();
|
||||
while (Time.Current - records.Peek().Time > spm_count_duration)
|
||||
while (records.Count > 0 && Time.Current - records.Peek().Time > spm_count_duration)
|
||||
record = records.Dequeue();
|
||||
SpinsPerMinute = (currentRotation - record.Rotation) / (Time.Current - record.Time) * 1000 * 60 / 360;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user