summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-06-01 13:26:12 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-06-01 13:26:12 +0100
commit4953c57dc8df31fe68e8986bb84565431ebe4406 (patch)
tree51ce8ec7e8e086a3da41bacb2bf1d3bf861dbc72
parent1653f977f3a4388463e080d79347b22a40ec6b13 (diff)
added inventory check
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 1ee755c..f67f8bb 100644
--- a/init.lua
+++ b/init.lua
@@ -246,7 +246,7 @@ minetest.register_abm({
local inv = meta:get_inventory()
-- is barrel empty?
- if inv:is_empty("src") then
+ if not inv or inv:is_empty("src") then
return
end