mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +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
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue