mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 16:41:06 +01:00
Fix random crash when piston breaks node with no player
This commit is contained in:
parent
378df76e5f
commit
520fd773fb
1 changed files with 8 additions and 6 deletions
|
@ -741,7 +741,8 @@ if minetest.is_creative_enabled("") then
|
||||||
for _, item in ipairs(drops) do
|
for _, item in ipairs(drops) do
|
||||||
minetest.add_item(pos, item)
|
minetest.add_item(pos, item)
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
|
-- If there is a player
|
||||||
local inv = digger:get_inventory()
|
local inv = digger:get_inventory()
|
||||||
if inv then
|
if inv then
|
||||||
for _, item in ipairs(drops) do
|
for _, item in ipairs(drops) do
|
||||||
|
@ -752,6 +753,7 @@ if minetest.is_creative_enabled("") then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
-- Initialize variables and inventory
|
-- Initialize variables and inventory
|
||||||
|
|
Loading…
Reference in a new issue