Skip to content

Commit

Permalink
Fixed null reference exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagord committed Aug 25, 2024
1 parent 5fb269a commit 163a5f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PulsarModLoader/CustomGUI/GUIMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,10 @@ void WindowFunction(int WindowID)
{
foreach (PhotonPlayer player in PhotonNetwork.playerList)
{
if (player.IsLocal)
PLPlayer plplayer = PLServer.GetPlayerForPhotonPlayer(player);
if (player.IsLocal || plplayer == null)
continue;
if (DrawButtonSelected(PLServer.GetPlayerForPhotonPlayer(player).GetPlayerName(), selectedPlayer == player))
if (DrawButtonSelected(plplayer.GetPlayerName(), selectedPlayer == player))
selectedPlayer = player;
}
}
Expand Down

0 comments on commit 163a5f4

Please sign in to comment.