From 6c36770eb388fe80f079b6001e7f4899bc1f20c9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Nov 2021 21:41:09 +0900 Subject: [PATCH] Add back allowance for tests scenes using empty `ShortName` --- osu.Game/Rulesets/Ruleset.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Rulesets/Ruleset.cs b/osu.Game/Rulesets/Ruleset.cs index a252bd4786..31ebcfd600 100644 --- a/osu.Game/Rulesets/Ruleset.cs +++ b/osu.Game/Rulesets/Ruleset.cs @@ -49,6 +49,10 @@ namespace osu.Game.Rulesets { get { + // Is the case for many test usages. + if (string.IsNullOrEmpty(ShortName)) + return CreateAllMods(); + if (!mod_reference_cache.TryGetValue(ShortName, out var mods)) mod_reference_cache[ShortName] = mods = CreateAllMods().Cast().ToArray();