From db64a14cdcdade8ee8b5465c2127bc4f5c2d1c85 Mon Sep 17 00:00:00 2001
From: tenplus1 <tenplus1@users.noreply.github.com>
Date: Sat, 2 Apr 2016 12:24:18 +0100
Subject: [PATCH] Quick fix

To stop crashing with nil instead of pos.
---
 shop.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/shop.lua b/shop.lua
index 1ee4438..531302f 100644
--- a/shop.lua
+++ b/shop.lua
@@ -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 ""
@@ -339,4 +340,4 @@ minetest.register_craft({
 		{"default:sign_wall"},
 		{"default:chest_locked"},
 	}
-})
\ No newline at end of file
+})
-- 
GitLab