add nil check for prot display removal

This commit is contained in:
tenplus1 2021-01-03 19:25:29 +00:00
parent 6bca4ffdff
commit 034029b0f4

@ -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