From 2932796a306ad16866b9912bce57e8208163ccb7 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 4 Jun 2016 21:10:17 +0200 Subject: [PATCH] [pipeworks] Use empty tables when luaentities is nil --- mods/pipeworks/luaentity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/pipeworks/luaentity.lua b/mods/pipeworks/luaentity.lua index e13c6131..3c4ff63d 100755 --- a/mods/pipeworks/luaentity.lua +++ b/mods/pipeworks/luaentity.lua @@ -29,7 +29,7 @@ local function read_entities() end local function write_entities() - for _, entity in pairs(luaentity.entities) do + for _, entity in pairs(luaentity.entities or {}) do setmetatable(entity, nil) for _, attached in pairs(entity._attached_entities) do if attached.entity then