Fix nullref

This commit is contained in:
smoogipoo 2021-04-22 18:44:14 +09:00
parent 1a715b2926
commit 8a6267580a
1 changed files with 4 additions and 2 deletions

View File

@ -65,9 +65,11 @@ public Mod[] Mods
{
get
{
Mod[] scoreMods = Array.Empty<Mod>();
var rulesetInstance = Ruleset?.CreateInstance();
if (rulesetInstance == null)
return mods ?? Array.Empty<Mod>();
var rulesetInstance = Ruleset.CreateInstance();
Mod[] scoreMods = Array.Empty<Mod>();
if (mods != null)
scoreMods = mods;