mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-12-22 12:32:22 +01:00
digiline: Prevent error upon ItemStack creation
This commit is contained in:
parent
c0b2a2013a
commit
b92bf0a3e6
@ -378,6 +378,10 @@ local function controller_on_digiline_receive(pos, _, channel, msg)
|
||||
return
|
||||
end
|
||||
|
||||
if msg and type(msg) ~= "string" and type(msg) ~= "table" then
|
||||
return -- Protect against ItemStack(...) errors
|
||||
end
|
||||
|
||||
local item = ItemStack(msg)
|
||||
local drawers_index = controller_get_drawer_index(pos, item:get_name())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user