mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:47:25 +08:00
Merge pull request #4782 from Altenhh/noObjectsFix
Fix hard crash if beatmap does not have any objects
This commit is contained in:
commit
5a9f8e5820
@ -63,8 +63,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var first = (OsuHitObject)Objects.First();
|
if (Objects.FirstOrDefault() is OsuHitObject first)
|
||||||
return first.StartTime - Math.Max(2000, first.TimePreempt);
|
return first.StartTime - Math.Max(2000, first.TimePreempt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user