From: SmallJoker Date: Sun, 16 Feb 2020 13:01:05 +0000 (+0100) Subject: Builtin: Fix error by digging unknown nodes X-Git-Tag: 5.2.0~112 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3f675490df7d4dd0cdd3ac4afe2683fe8678b24d;p=oweals%2Fminetest.git Builtin: Fix error by digging unknown nodes --- 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,