summaryrefslogtreecommitdiff
path: root/item_transport.lua
diff options
context:
space:
mode:
authorroot <root@linux-forks.de>2018-08-22 21:47:49 +0200
committerroot <root@linux-forks.de>2018-08-22 21:47:49 +0200
commit33ac76d890cac1c2ba808f2fe1a064f1e7c0fc45 (patch)
tree20e9baf4048970bf8eecf1c6d596bc95db60d2dc /item_transport.lua
parentc18b9fc40837aacb1ed37b7c07eeeea315ed586b (diff)
parent6fdda1839064684f77c9ea7f3e087a2d3d6fa388 (diff)
Merge branch 'master' of https://github.com/minetest-mods/pipeworks
Diffstat (limited to 'item_transport.lua')
-rw-r--r--item_transport.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/item_transport.lua b/item_transport.lua
index 388e2e7..d3a13c5 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -350,8 +350,10 @@ luaentity.register_entity("pipeworks:tubed_item", {
-- compatible with Minetest 0.4.13.
-- Using item_drop here makes Minetest 0.4.13 crash.
local dropped_item = minetest.add_item(self.start_pos, stack)
- dropped_item:set_velocity(vector.multiply(velocity, 5))
- self:remove()
+ if dropped_item then
+ dropped_item:set_velocity(vector.multiply(velocity, 5))
+ self:remove()
+ end
return
else
velocity = vector.multiply(velocity, -1)