Skip to content

Commit

Permalink
Check for null NatType in find room match
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Sep 2, 2023
1 parent 62378af commit bb6e7f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Response Execute(MatchService service, LoggerContainer<BunkumContext> log
.ToList();

//When a user is behind a Strict NAT layer, we can only connect them to players with Open NAT types
if (body.NatType[0] == NatType.Strict)
if (body.NatType != null && body.NatType[0] == NatType.Strict)
{
rooms = rooms.Where(r => r.NatType == NatType.Open).ToList();
}
Expand Down

0 comments on commit bb6e7f8

Please sign in to comment.