Skip to content

Commit

Permalink
Add null check for playerData
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellochner authored Jul 19, 2024
1 parent 86b9dbb commit 8b2f6b3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void SetAsFriend()

private void OnConfirmFriendRequest(PlayerData playerData)
{
if (OwnerClientId == playerData.clientId)
if (playerData != null && OwnerClientId == playerData.clientId)
{
SetAsFriend();
}
Expand Down

0 comments on commit 8b2f6b3

Please sign in to comment.