diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-01-20 14:49:30 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-01-20 14:49:30 +0100 |
commit | cf6ec6dd5aa62d7da48a9e3d0d9aa830856285c0 (patch) | |
tree | 0effae33f9d3b1349f08a0cadbc7e380bc075384 | |
parent | 835571054346bd21f22aa1414be5913aa67a98b0 (diff) | |
download | smartshop-cf6ec6dd5aa62d7da48a9e3d0d9aa830856285c0.tar.gz smartshop-cf6ec6dd5aa62d7da48a9e3d0d9aa830856285c0.tar.bz2 smartshop-cf6ec6dd5aa62d7da48a9e3d0d9aa830856285c0.zip |
Fixed crash when smartshop position unknown
-rw-r--r-- | init.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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()
|