From: Vanessa Ezekowitz Date: Sun, 9 Feb 2014 02:54:06 +0000 (-0500) Subject: check for malformed table in scan_for_tube_objects() X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=458fbb6240acd92877271bbe334c4aedb8e4061d;p=zefram%2Fminetest%2Fpipeworks.git check for malformed table in scan_for_tube_objects() --- 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 })