[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
1 changed files with 1 additions and 1 deletions

View File

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