1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Fix potential failure when slider has no ticks

This commit is contained in:
Dean Herbert 2023-10-12 03:19:43 +09:00
parent 63843c79c3
commit 5ffc25c8e8
No known key found for this signature in database

View File

@ -228,7 +228,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
double trackingEndTime = Math.Max(Math.Max(
slider.StartTime + slider.Duration + SliderEventGenerator.TAIL_LENIENCY,
slider.StartTime + slider.Duration / 2
), slider.NestedHitObjects.OfType<SliderTick>().Last().StartTime);
), slider.NestedHitObjects.OfType<SliderTick>().LastOrDefault()?.StartTime ?? double.MinValue);
slider.LazyTravelTime = trackingEndTime - slider.StartTime;