mirror of https://github.com/ppy/osu
Fix nullref
This commit is contained in:
parent
1a715b2926
commit
8a6267580a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue