Fix potential missing ruleset

This commit is contained in:
smoogipoo 2020-07-22 12:48:12 +09:00
parent aca4110e36
commit 6b7f05740e
1 changed files with 3 additions and 0 deletions

View File

@ -176,6 +176,9 @@ private BindableStarDifficulty createBindable([NotNull] BeatmapInfo beatmapInfo,
/// <returns>The <see cref="StarDifficulty"/>.</returns>
private StarDifficulty computeDifficulty(in DifficultyCacheLookup key, BeatmapInfo beatmapInfo, RulesetInfo rulesetInfo)
{
// In the case that the user hasn't given us a ruleset, use the beatmap's default ruleset.
rulesetInfo ??= beatmapInfo.Ruleset;
try
{
var ruleset = rulesetInfo.CreateInstance();