mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
Fix server crash when dispensing an unknown item
This works similar to 2aafb2f2d01a6ece9ed4642a7081c53dbf22f773, however it is a cleaner way to do it.
This commit is contained in:
parent
8445a9ddec
commit
fb01e61946
@ -129,8 +129,13 @@ local dispenserdef = {
|
||||
dropitem:set_count(1)
|
||||
local stack_id = stacks[r].stackpos
|
||||
local stackdef = stack:get_definition()
|
||||
|
||||
if not stackdef then
|
||||
return
|
||||
end
|
||||
|
||||
local iname = stack:get_name()
|
||||
local igroups = minetest.registered_items[iname].groups
|
||||
local igroups = stackdef.groups
|
||||
|
||||
--[===[ Dispense item ]===]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user