mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:47:46 +08:00
Fix WaveformComparisonDisplay
potentially crashing on invalid track length
As seen at https://github.com/ppy/osu/runs/17415814918#r0s2.
This commit is contained in:
parent
66824ce8ca
commit
76cc2f9f22
@ -191,6 +191,10 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
private void regenerateDisplay(bool animated)
|
||||
{
|
||||
// Before a track is loaded, it won't have a valid length, which will break things.
|
||||
if (!beatmap.Value.Track.IsLoaded)
|
||||
return;
|
||||
|
||||
double index = (displayedTime - selectedGroupStartTime) / timingPoint.BeatLength;
|
||||
|
||||
// Chosen as a pretty usable number across all BPMs.
|
||||
|
Loading…
Reference in New Issue
Block a user