Fix potential crash when falling onto unknown node

This commit is contained in:
Lizzy Fleckenstein 2021-12-19 18:59:09 +01:00
parent e2360204a7
commit bfd1fd69d1
Signed by: LizzyFleckenstein03
GPG Key ID: 06927A5199D6C9B2
1 changed files with 2 additions and 1 deletions

View File

@ -550,7 +550,8 @@ mcl_damage.register_modifier(function(obj, damage, reason)
node = minetest.get_node(pos)
end
if node then
if minetest.registered_nodes[node.name].walkable then
local def = minetest.registered_nodes[node.name]
if not def or def.walkable then
return
end
if minetest.get_item_group(node.name, "water") ~= 0 then