From: Vanessa Ezekowitz Date: Mon, 6 Jan 2014 02:56:14 +0000 (-0500) Subject: fix nil reference crash in tube autorouter when unknown nodes are nearby X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=937a8a573299a84de62378c883c6119d9ea45898;p=zefram%2Fminetest%2Fpipeworks.git fix nil reference crash in tube autorouter when unknown nodes are nearby (?) --- 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