builtin/.../falling.lua: Avoid crash when hitting unknown nodes

This commit is contained in:
sfan5 2017-01-09 16:39:40 +01:00
parent 8c1b4f298e
commit 73fdb63597

@ -83,7 +83,7 @@ core.register_entity(":__builtin:falling_node", {
-- it's drops -- it's drops
if n2.name ~= "air" and (not nd or nd.liquidtype == "none") then if n2.name ~= "air" and (not nd or nd.liquidtype == "none") then
core.remove_node(np) core.remove_node(np)
if nd.buildable_to == false then if nd and nd.buildable_to == false then
-- Add dropped items -- Add dropped items
local drops = core.get_node_drops(n2.name, "") local drops = core.get_node_drops(n2.name, "")
for _, dropped_item in pairs(drops) do for _, dropped_item in pairs(drops) do