diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index 07f1181a69..1ca62471f4 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -44,7 +44,8 @@ namespace osu.Game.Scoring { get { - if (mods != null) return mods; + if (mods != null) + return mods; if (modsJson == null) return Array.Empty(); @@ -65,7 +66,16 @@ namespace osu.Game.Scoring [Column("Mods")] public string ModsJson { - get => modsJson ?? (modsJson = JsonConvert.SerializeObject(mods)); + get + { + if (modsJson != null) + return modsJson; + + if (mods == null) + return null; + + return modsJson = JsonConvert.SerializeObject(mods); + } set { modsJson = value;