ent:isValid() errors on null entities
🌙 Lua•Updated 2 days ago•0 views
isValid itself can error on a null/NULL entity pointer - guard with a plain `if ent` / IsValid-style check before calling methods, or wrap in pcall.
Why does ent:isValid() throw an error when the entity is null
isValid itself can error on a null/NULL entity pointer - guard with a plain `if ent` / IsValid-style check before calling methods, or wrap in pcall.