Fix NullReference

This commit is contained in:
hydrant
2020-03-09 20:56:36 +01:00
parent 1f51af195c
commit baba3e1ae2

View File

@@ -166,7 +166,7 @@ namespace ReallifeGamemode.Server.Events
int medicCount = 0; int medicCount = 0;
foreach (Player c in NAPI.Pools.GetAllPlayers()) foreach (Player c in NAPI.Pools.GetAllPlayers())
{ {
if ((c.GetUser()?.Faction.Id ?? 0) == 2) if ((c.GetUser()?.Faction?.Id ?? 0) == 2)
{ {
medicCount++; medicCount++;
} }