mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 06:12:57 +08:00
Fix crash in editor when trying to seek on a virtual track
This commit is contained in:
parent
d17f6cb564
commit
ae9f08f387
@ -47,6 +47,8 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
|||||||
if (Beatmap.Value == null)
|
if (Beatmap.Value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Beatmap.Value.Track.Length == double.PositiveInfinity) return;
|
||||||
|
|
||||||
float markerPos = MathHelper.Clamp(ToLocalSpace(screenPosition).X, 0, DrawWidth);
|
float markerPos = MathHelper.Clamp(ToLocalSpace(screenPosition).X, 0, DrawWidth);
|
||||||
seekTo(markerPos / DrawWidth * Beatmap.Value.Track.Length);
|
seekTo(markerPos / DrawWidth * Beatmap.Value.Track.Length);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user