Skip to content

Commit

Permalink
Fix null exception
Browse files Browse the repository at this point in the history
  • Loading branch information
timiimit committed Mar 15, 2023
1 parent 3ced51b commit d6dd7ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UT4MasterServer/Controllers/UT/MatchmakingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public async Task<IActionResult> CreateGameServer([FromBody] GameServer server)
throw new Exception("This should never happen");
}

var serverName = server.Attributes.Get(GameServerAttributes.UT_SERVERNAME_s) as string;
var serverName = server.Attributes.Get(GameServerAttributes.UT_SERVERNAME_s) as string ?? string.Empty;
var isRanked = (int?)server.Attributes.Get(GameServerAttributes.UT_RANKED_i) == 1;
if (trust != GameServerTrust.Epic && !isRanked && serverName.Trim() != client.Name.Trim())
{
Expand Down

0 comments on commit d6dd7ec

Please sign in to comment.