From 3f675490df7d4dd0cdd3ac4afe2683fe8678b24d Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 16 Feb 2020 14:01:05 +0100 Subject: [PATCH] Builtin: Fix error by digging unknown nodes --- builtin/game/item.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,