summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-02-16 14:01:05 +0100
committerSmallJoker <mk939@ymail.com>2020-02-16 14:13:52 +0100
commit3f675490df7d4dd0cdd3ac4afe2683fe8678b24d (patch)
treee1583690eeade47c0c4cbc8c20aa3216fb0e18f6
parent7ce21788f86d489d6dc08d9b2d3f6e3f8495b64e (diff)
downloadminetest-3f675490df7d4dd0cdd3ac4afe2683fe8678b24d.tar.gz
minetest-3f675490df7d4dd0cdd3ac4afe2683fe8678b24d.tar.bz2
minetest-3f675490df7d4dd0cdd3ac4afe2683fe8678b24d.zip
Builtin: Fix error by digging unknown nodes
-rw-r--r--builtin/game/item.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index cc221b3f5..513c3a5e1 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -621,7 +621,7 @@ function core.node_dig(pos, node, digger)
core.remove_node(pos)
-- Play sound if it was done by a player
- if diggername ~= "" and def.sounds and def.sounds.dug then
+ if diggername ~= "" and def and def.sounds and def.sounds.dug then
core.sound_play(def.sounds.dug, {
pos = pos,
exclude_player = diggername,