From: Kyle Date: Fri, 22 Feb 2013 01:07:20 +0000 (-0800) Subject: Avoid a nil index crash X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=985401a23d1581e71f762bdaeadfc19734fdf148;p=zefram%2Fminetest%2Ftechnic.git Avoid a nil index crash --- diff --git a/technic/frames.lua b/technic/frames.lua index 0e095bd..f555368 100644 --- a/technic/frames.lua +++ b/technic/frames.lua @@ -373,8 +373,8 @@ function move_nodes_vect(poslist,vect) end for _,obj in ipairs(objects) do obj:setpos(addVect(obj:getpos(),vect)) - if obj:get_luaentity().name == "pipeworks:tubed_item" then - le=obj:get_luaentity() + le=obj:get_luaentity() + if le and le.name == "pipeworks:tubed_item" then le.start_pos=addVect(le.start_pos,vect) end end