Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
fix: add 'player' value null check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Plorence committed Apr 10, 2022
1 parent 5794b97 commit 19f7e67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Kartrider.Api/Json/Converters/MatchDetailJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public override MatchDetail Read(ref Utf8JsonReader reader, Type typeToConvert,

case "players":
reader.Read();
if (reader.TokenType == JsonTokenType.Null)
{
break;
}
reader.Read();
if (matchDetail.Players == null) matchDetail.Players = new List<Player>();
while (reader.TokenType != JsonTokenType.EndArray)
Expand Down

0 comments on commit 19f7e67

Please sign in to comment.