Fix various test failures due to missing beatmap info in empty beatmap

This commit is contained in:
Dean Herbert 2020-09-03 19:20:42 +09:00
parent 58e84760b9
commit a555407f37
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps
protected override IBeatmap GetBeatmap()
{
if (BeatmapInfo.Path == null)
return BeatmapInfo.Ruleset.CreateInstance().CreateBeatmapConverter(new Beatmap()).Beatmap;
return BeatmapInfo?.Ruleset.CreateInstance().CreateBeatmapConverter(new Beatmap { BeatmapInfo = BeatmapInfo }).Beatmap;
try
{

View File

@ -53,7 +53,7 @@ namespace osu.Game.Beatmaps
{
const double excess_length = 1000;
var lastObject = Beatmap.HitObjects.LastOrDefault();
var lastObject = Beatmap?.HitObjects.LastOrDefault();
double length;