1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix possible nullref.

This commit is contained in:
smoogipooo 2017-05-18 19:05:03 +09:00
parent c80e2e8f0a
commit 4e8ead9cf4

View File

@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Mania.UI
return t;
});
double lastObjectTime = (Objects.Last() as IHasEndTime)?.EndTime ?? Objects.Last().StartTime;
double lastObjectTime = (Objects.LastOrDefault() as IHasEndTime)?.EndTime ?? Objects.LastOrDefault()?.StartTime ?? double.MaxValue;
// Perform some post processing of the timing changes
timingChanges = timingChanges