Fix beatmap import crash when the first timingPoint starts later than a slider

This commit is contained in:
Shadoxfix 2017-02-17 17:36:00 +01:00
parent ecb840e26f
commit 72306e8757

View File

@ -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;
}