Fix error for 'nil' player in minetest.handle_node_drops (#36)

This commit is contained in:
HybridDog 2020-09-27 19:15:57 +02:00 committed by GitHub
parent de38b20fa6
commit 1545f82cb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -378,7 +378,7 @@ and not minetest.settings:get_bool("creative_mode") then
local old_handle_node_drops = minetest.handle_node_drops local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, player) function minetest.handle_node_drops(pos, drops, player)
if player.is_fake_player then if not player or player.is_fake_player then
-- Node Breaker or similar machines should receive items in the -- Node Breaker or similar machines should receive items in the
-- inventory -- inventory
return old_handle_node_drops(pos, drops, player) return old_handle_node_drops(pos, drops, player)