summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index e4d297f..ce6cce0 100644
--- a/init.lua
+++ b/init.lua
@@ -79,6 +79,9 @@ smartshop.receive_fields=function(player,pressed)
if pressed["buy" .. i] then break end
end
local pos=smartshop.user[player:get_player_name()]
+ if not pos then
+ return
+ end
local meta=minetest.get_meta(pos)
local type=meta:get_int("type")
local inv=meta:get_inventory()