From cf6ec6dd5aa62d7da48a9e3d0d9aa830856285c0 Mon Sep 17 00:00:00 2001 From: Gabriel PĂ©rez-Cerezo Date: Sat, 20 Jan 2018 14:49:30 +0100 Subject: Fixed crash when smartshop position unknown --- init.lua | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v1.2.3