Fix NullReference
This commit is contained in:
@@ -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++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user