[mcl_portals] Fix crash on access empty index trying to find portal after its destruction
This commit is contained in:
parent
cb2aae5a55
commit
05260d03d5
|
@ -103,7 +103,7 @@ local function add_exit(p)
|
|||
local e = exits[k]
|
||||
for i = 1, #e do
|
||||
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
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue