From 7d68532b74464f821099e665416f5f2bea6dcc42 Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 5 Apr 2021 15:36:56 +0200 Subject: [PATCH] =?UTF-8?q?gef=C3=A4ngnis=20pc=20nullreference=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Events/Key.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 41e08be7..e5aef019 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -513,6 +513,11 @@ namespace ReallifeGamemode.Server.Events foreach (Player target in NAPI.Pools.GetAllPlayers()) { User c = target.GetUser(); + if(c == null) + { + continue; + } + if (c.JailTime > 0) { criminals.Add(c.Name);