summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-02-08 21:54:06 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-02-08 21:54:06 -0500
commit458fbb6240acd92877271bbe334c4aedb8e4061d (patch)
tree334526778a14045855b14168658cc5daee882920
parent012aa398217e3ba2c3fa19ed44af90e1a339aa8d (diff)
downloadpipeworks-458fbb6240acd92877271bbe334c4aedb8e4061d.tar
pipeworks-458fbb6240acd92877271bbe334c4aedb8e4061d.tar.gz
pipeworks-458fbb6240acd92877271bbe334c4aedb8e4061d.tar.bz2
pipeworks-458fbb6240acd92877271bbe334c4aedb8e4061d.tar.xz
pipeworks-458fbb6240acd92877271bbe334c4aedb8e4061d.zip
check for malformed table in scan_for_tube_objects()
-rw-r--r--autoplace_tubes.lua2
1 files changed, 1 insertions, 1 deletions
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 })