Skip to content

Commit

Permalink
builtin/.../falling.lua: Avoid crash when hitting unknown nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jan 9, 2017
1 parent 8c1b4f2 commit 73fdb63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/game/falling.lua
Expand Up @@ -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
Expand Down

0 comments on commit 73fdb63

Please sign in to comment.