Fix NullReference
This commit is contained in:
@@ -166,7 +166,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
int medicCount = 0;
|
||||
foreach (Player c in NAPI.Pools.GetAllPlayers())
|
||||
{
|
||||
if ((c.GetUser()?.Faction.Id ?? 0) == 2)
|
||||
if ((c.GetUser()?.Faction?.Id ?? 0) == 2)
|
||||
{
|
||||
medicCount++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user