Fix ManiaDifficultyCalculator possibly failing due to nullref

This commit is contained in:
smoogipoo
2017-11-17 14:37:06 +09:00
parent ac6213d1fa
commit 95fd323c6b
5 changed files with 6 additions and 11 deletions

View File

@ -22,14 +22,9 @@ namespace osu.Game.Beatmaps
protected readonly Beatmap<T> Beatmap;
protected readonly Mod[] Mods;
protected DifficultyCalculator(Beatmap beatmap)
: this(beatmap, null)
{
}
protected DifficultyCalculator(Beatmap beatmap, Mod[] mods = null)
{
Beatmap = CreateBeatmapConverter().Convert(beatmap);
Beatmap = CreateBeatmapConverter(beatmap).Convert(beatmap);
Mods = mods ?? new Mod[0];
@ -59,6 +54,6 @@ namespace osu.Game.Beatmaps
{
}
protected abstract BeatmapConverter<T> CreateBeatmapConverter();
protected abstract BeatmapConverter<T> CreateBeatmapConverter(Beatmap beatmap);
}
}