Fix Lua error involving GetProp
Addresses https://github.com/JetBoom/zombiesurvival/issues/91
This commit is contained in:
parent
63849dcaa4
commit
81820d6e8b
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ function ENT:SetProp(ent)
|
|||
if not IsValid(ent) then return end
|
||||
|
||||
for _, e in pairs(ents.FindByClass(self:GetClass())) do
|
||||
if e ~= self and e:GetProp() == ent then return end
|
||||
if e ~= self and e and e:IsValid() and e:GetProp() == ent then return end
|
||||
end
|
||||
|
||||
local teamid = self:GetTeam()
|
||||
|
|
Loading…
Reference in a new issue