mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Fix crash when loading scores with no mods
This commit is contained in:
parent
d2f0a921ca
commit
aa7f66b24a
@ -43,6 +43,9 @@ namespace osu.Game.Scoring
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (modsString == null)
|
||||||
|
return Array.Empty<Mod>();
|
||||||
|
|
||||||
var deserialized = JsonConvert.DeserializeObject<string[]>(modsString);
|
var deserialized = JsonConvert.DeserializeObject<string[]>(modsString);
|
||||||
return Ruleset.CreateInstance().GetAllMods().Where(mod => deserialized.Any(d => d == mod.ShortenedName)).ToArray();
|
return Ruleset.CreateInstance().GetAllMods().Where(mod => deserialized.Any(d => d == mod.ShortenedName)).ToArray();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user