Fix wanted system null reference

This commit is contained in:
hydrant
2019-07-20 13:22:29 +02:00
parent c27f2a7d82
commit 9bd5b029cd

View File

@@ -109,7 +109,7 @@ namespace ReallifeGamemode.Server.Wanted
foreach (var player in NAPI.Pools.GetAllPlayers())
{
User user = player.GetUser();
if (!Jailtime.ContainsKey(user.Id))
if (user != null && !Jailtime.ContainsKey(user.Id))
{
foreach (var copPlayer in NAPI.Pools.GetAllPlayers())
{
@@ -180,7 +180,6 @@ namespace ReallifeGamemode.Server.Wanted
}
}
public static void Release_Jail(Client player, string reason)
{
User user = player.GetUser();