1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Fix Pippidon crash on empty beatmap conversion

This commit is contained in:
Dean Herbert 2022-08-18 16:17:50 +09:00
parent b0a740071e
commit bb46f72f9e

View File

@ -21,8 +21,11 @@ namespace osu.Game.Rulesets.Pippidon.Beatmaps
public PippidonBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) public PippidonBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
: base(beatmap, ruleset) : base(beatmap, ruleset)
{ {
minPosition = beatmap.HitObjects.Min(getUsablePosition); if (beatmap.HitObjects.Any())
maxPosition = beatmap.HitObjects.Max(getUsablePosition); {
minPosition = beatmap.HitObjects.Min(getUsablePosition);
maxPosition = beatmap.HitObjects.Max(getUsablePosition);
}
} }
public override bool CanConvert() => Beatmap.HitObjects.All(h => h is IHasXPosition && h is IHasYPosition); public override bool CanConvert() => Beatmap.HitObjects.All(h => h is IHasXPosition && h is IHasYPosition);