Fixed a possible crash when checking 'attached_node2'

master
MoNTE48 2020-04-20 21:51:08 +02:00
parent d4c34bfe75
commit c430f18ad4
1 changed files with 2 additions and 1 deletions

View File

@ -289,7 +289,8 @@ function core.check_single_for_falling(p)
for j = 1, 4 do
local ptwo = vadd(pa, check_connected[j])
local ntwo = core.get_node(ptwo)
if core.registered_nodes[ntwo.name].walkable then
local def = core.registered_nodes[ntwo.name]
if def and def.walkable then
connected = true
return false
end