From 378173cc66e202e97a342b51c6f0f4a6327cf278 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Jan 2022 22:46:29 +0900 Subject: [PATCH] Fix some score imports failing due to null string attempted to be parsed as json --- osu.Game/Scoring/EFScoreInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Scoring/EFScoreInfo.cs b/osu.Game/Scoring/EFScoreInfo.cs index 1dd4e3b6b3..4161336cfc 100644 --- a/osu.Game/Scoring/EFScoreInfo.cs +++ b/osu.Game/Scoring/EFScoreInfo.cs @@ -105,7 +105,7 @@ public APIMod[] APIMods public string ModsJson { get => JsonConvert.SerializeObject(APIMods); - set => APIMods = JsonConvert.DeserializeObject(value); + set => APIMods = !string.IsNullOrEmpty(value) ? JsonConvert.DeserializeObject(value) : Array.Empty(); } [NotMapped]