mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 07:38:48 -05:00
builtin/.../falling.lua: Avoid crash when hitting unknown nodes
This commit is contained in:
parent
8c1b4f298e
commit
73fdb63597
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user