From 985401a23d1581e71f762bdaeadfc19734fdf148 Mon Sep 17 00:00:00 2001 From: Kyle <khonkhortisan@gmail.com> Date: Fri, 22 Feb 2013 02:14:38 +0100 Subject: [PATCH] Avoid a nil index crash --- technic/frames.lua | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 @@ 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 -- Gitblit v1.8.0