Fix nil crash when calling unifieddyes.on_dig() w/o PlayerRef (#21)

This commit is contained in:
Niklp 2024-04-19 15:41:56 +02:00 committed by GitHub
parent 3e45f316a3
commit de6e2e0e35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -49,6 +49,7 @@ minetest.register_on_placenode(
-- adapted from
-- https://github.com/minetest/minetest/blob/fe8d04d0b3c2e3af7c406fb6527f1b5230a30137/builtin/game/item.lua#L460-L562
local function node_dig_without_color(pos, node, digger)
if not digger then return false end
local diggername = digger:get_player_name()
local def = ItemStack(node.name):get_definition()