diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-05-31 17:31:19 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-05-31 17:31:19 +0100 |
commit | 038aece5f782111197af295655f6bd6ec3e2c414 (patch) | |
tree | 2e59ad4d0f1aa387c6bf58ea4ccf47de323f04d0 | |
parent | a37e8e651e7daf12a3ca2913b4397fdf737f3ca5 (diff) |
fix obj nil bug
-rw-r--r-- | init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -241,7 +241,9 @@ function minetest.is_protected(pos, digger) -- drop stack local obj = minetest.add_item(player:getpos(), sta) - obj:setvelocity({x = 0, y = 5, z = 0}) + if obj then + obj:setvelocity({x = 0, y = 5, z = 0}) + end end) end |