[mcl_portals] Fix crash on access empty index trying to find portal after its destruction

This commit is contained in:
kay27 2021-03-29 01:33:01 +04:00
parent cb2aae5a55
commit 05260d03d5

View file

@ -103,7 +103,7 @@ local function add_exit(p)
local e = exits[k] local e = exits[k]
for i = 1, #e do for i = 1, #e do
local t = e[i] local t = e[i]
if t.x == p.x and t.y == p.y and t.z == p.z then if t and t.x == p.x and t.y == p.y and t.z == p.z then
return return
end end
end end