From 9bd5b029cdac1b18a025e4b6c977995e47d37154 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 20 Jul 2019 13:22:29 +0200 Subject: [PATCH] Fix wanted system null reference --- ReallifeGamemode.Server/Wanted/Jail.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 66b5df9a..566f047e 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -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();