Quick fix

To stop crashing with nil instead of pos.
This commit is contained in:
tenplus1 2016-04-02 12:24:18 +01:00
parent e7425e19e9
commit db64a14cdc
1 changed files with 2 additions and 1 deletions

View File

@ -91,6 +91,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
return
end
local player_name = sender:get_player_name()
if not exchange_shop[player_name] then return end
local pos = exchange_shop[player_name]
local meta = minetest.get_meta(pos)
local title = meta:get_string("title") or ""