tooldef can be nil (#4767)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4767
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
This commit is contained in:
kno10 2024-12-29 15:56:57 +01:00 committed by the-real-herowl
parent b41960d5ed
commit cb1814f6ae

@ -319,7 +319,7 @@ function minetest.handle_node_drops(pos, drops, digger)
end
-- Special node drops (crushing) when digging with a hammer
local hammer = tooldef.groups.hammer
local hammer = tooldef and tooldef.groups.hammer
if hammer and hammer > 0 and nodedef._vl_crushing_drop then
drops = nodedef._vl_crushing_drop
-- Fortune drops