fixed player null issue

This commit is contained in:
Nicola Sovic 2022-06-12 14:18:56 +02:00
parent b15ffe2d49
commit 182947e84f

View File

@ -67,9 +67,12 @@ namespace Assets.Scripts
public static bool isGodMode(Player player) public static bool isGodMode(Player player)
{ {
bool result = false; bool result = false;
if (player.getPlayerName().ToLower() == "nicola") if (player != null)
{ {
result = true; if (player.getPlayerName().ToLower() == "nicola")
{
result = true;
}
} }
return result; return result;
} }