summaryrefslogtreecommitdiff
path: root/nodes/node_item_ejector.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nodes/node_item_ejector.lua')
-rw-r--r--nodes/node_item_ejector.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/nodes/node_item_ejector.lua b/nodes/node_item_ejector.lua
index 6f9c64e..aa09909 100644
--- a/nodes/node_item_ejector.lua
+++ b/nodes/node_item_ejector.lua
@@ -67,6 +67,9 @@ local function eject_items(pos, node, player, eject_even_without_pipeworks)
local source_index = nil
local source_stack = nil
for _, node_image in pairs(layout.inventories) do
+ if type(node_image.meta.inventory.main) ~= "table" then
+ node_image.meta.inventory.main = {}
+ end
for index, item_stack in pairs(node_image.meta.inventory.main) do
if item_stack:get_count() > 0 and not filter_items[item_stack:get_name()] then
source_node = node_image