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

View File

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