summaryrefslogtreecommitdiff
path: root/autoplace_tubes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-01-05 21:56:14 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-01-05 21:56:14 -0500
commit937a8a573299a84de62378c883c6119d9ea45898 (patch)
tree530ad0a31eb734354fa5b8d6c9d3a9e10144147c /autoplace_tubes.lua
parentd33eb89dcb1888ee1c194161e5526db5399e1e53 (diff)
downloadpipeworks-937a8a573299a84de62378c883c6119d9ea45898.tar
pipeworks-937a8a573299a84de62378c883c6119d9ea45898.tar.gz
pipeworks-937a8a573299a84de62378c883c6119d9ea45898.tar.bz2
pipeworks-937a8a573299a84de62378c883c6119d9ea45898.tar.xz
pipeworks-937a8a573299a84de62378c883c6119d9ea45898.zip
fix nil reference crash in tube autorouter when unknown nodes are nearby
(?)
Diffstat (limited to 'autoplace_tubes.lua')
-rw-r--r--autoplace_tubes.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoplace_tubes.lua b/autoplace_tubes.lua
index 441e62a..385458c 100644
--- a/autoplace_tubes.lua
+++ b/autoplace_tubes.lua
@@ -100,7 +100,7 @@ local function tube_autoroute(pos)
if is_tube(node.name) then
active[i] = 1
-- handle new style connectors
- elseif idef.tube and idef.tube.connect_sides then
+ elseif idef and idef.tube and idef.tube.connect_sides then
local dir = adjustments[i]
if idef.tube.connect_sides[nodeside(node, {x=-dir.x, y=-dir.y, z=-dir.z})] then active[i] = 1 end
end