From 72306e8757fb158aa0ef28c548611bc61d5ef5f9 Mon Sep 17 00:00:00 2001 From: Shadoxfix Date: Fri, 17 Feb 2017 17:36:00 +0100 Subject: [PATCH] Fix beatmap import crash when the first timingPoint starts later than a slider --- osu.Game/Beatmaps/Beatmap.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index d0ce290bad..cd99710db2 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -39,6 +39,7 @@ namespace osu.Game.Beatmaps ControlPoint timingPoint = null; foreach (var controlPoint in ControlPoints) + { if (controlPoint.Time <= time) { if (controlPoint.TimingChange) @@ -48,7 +49,15 @@ namespace osu.Game.Beatmaps } else overridePoint = controlPoint; } - else break; + else if (timingPoint == null && controlPoint.TimingChange) + { + timingPoint = controlPoint; + } + else + { + break; + } + } return timingPoint; }