From 458fbb6240acd92877271bbe334c4aedb8e4061d Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 8 Feb 2014 21:54:06 -0500 Subject: [PATCH] check for malformed table in scan_for_tube_objects() --- autoplace_tubes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoplace_tubes.lua b/autoplace_tubes.lua index 385458c..c9d5d9f 100644 --- a/autoplace_tubes.lua +++ b/autoplace_tubes.lua @@ -131,7 +131,7 @@ local function tube_autoroute(pos) end function pipeworks.scan_for_tube_objects(pos) - if pos == nil then return end + if not pos or not pos.x or not pos.y or not pos.z then return end tube_autoroute({ x=pos.x-1, y=pos.y , z=pos.z }) tube_autoroute({ x=pos.x+1, y=pos.y , z=pos.z }) tube_autoroute({ x=pos.x , y=pos.y-1, z=pos.z }) -- 2.30.2