mirror of https://github.com/ppy/osu
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 @@ public override double GameplayStartTime
|
|||
{
|
||||
get
|
||||
{
|
||||
var first = (OsuHitObject)Objects.First();
|
||||
return first.StartTime - Math.Max(2000, first.TimePreempt);
|
||||
if (Objects.FirstOrDefault() is OsuHitObject first)
|
||||
return first.StartTime - Math.Max(2000, first.TimePreempt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue