aboutsummaryrefslogtreecommitdiff
path: root/builtin/game
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/game')
-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,