mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:47:46 +08:00
Fix possible nullref
This commit is contained in:
parent
b36db3518c
commit
c31ff84417
@ -126,12 +126,14 @@ namespace osu.Game.Screens.Select.Details
|
||||
mod.ApplyToDifficulty(adjustedDifficulty);
|
||||
}
|
||||
|
||||
switch (gameRuleset.Value.OnlineID)
|
||||
IRulesetInfo ruleset = gameRuleset?.Value ?? beatmapInfo.Ruleset;
|
||||
|
||||
switch (ruleset.OnlineID)
|
||||
{
|
||||
case 3:
|
||||
// Account for mania differences locally for now.
|
||||
// Eventually this should be handled in a more modular way, allowing rulesets to return arbitrary difficulty attributes.
|
||||
ILegacyRuleset legacyRuleset = (ILegacyRuleset)gameRuleset.Value.CreateInstance();
|
||||
ILegacyRuleset legacyRuleset = (ILegacyRuleset)ruleset.CreateInstance();
|
||||
|
||||
// For the time being, the key count is static no matter what, because:
|
||||
// a) The method doesn't have knowledge of the active keymods. Doing so may require considerations for filtering.
|
||||
|
Loading…
Reference in New Issue
Block a user