mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-21 22:23:44 +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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if msg and type(msg) ~= "string" and type(msg) ~= "table" then
|
||||||
|
return -- Protect against ItemStack(...) errors
|
||||||
|
end
|
||||||
|
|
||||||
local item = ItemStack(msg)
|
local item = ItemStack(msg)
|
||||||
local drawers_index = controller_get_drawer_index(pos, item:get_name())
|
local drawers_index = controller_get_drawer_index(pos, item:get_name())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user