add nil check for prot display removal
This commit is contained in:
parent
6bca4ffdff
commit
034029b0f4
1 changed files with 2 additions and 1 deletions
3
init.lua
3
init.lua
|
|
@ -457,7 +457,8 @@ local del_display = function(pos)
|
|||
|
||||
for _, v in ipairs(objects) do
|
||||
|
||||
if v:get_luaentity().name == "protector:display" then
|
||||
if v and v:get_luaentity()
|
||||
and v:get_luaentity().name == "protector:display" then
|
||||
v:remove()
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue