summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-02-22 08:21:29 -0800
committerRealBadAngel <mk@realbadangel.pl>2013-02-22 08:21:29 -0800
commit39fdb88cde7407ce847aafdafaaa60c7e28396e8 (patch)
tree3cc0b3ab71ff9272064b9095a68a58fcf50f40b5
parent1a09ffaf499dc35a5a25a6006dc4fc70d8b7bf37 (diff)
parent985401a23d1581e71f762bdaeadfc19734fdf148 (diff)
Merge pull request #8 from khonkhortisan/master
check whether an object is really a luaentity before trying to get its name
-rw-r--r--technic/frames.lua4
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 @@ 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