From 8f58e3fda2a23506031c54aa228bc7e3a39bbe01 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 25 Jan 2021 00:38:57 +0100 Subject: [PATCH] Fix potential crash --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a60de83..28a56e6 100644 --- a/init.lua +++ b/init.lua @@ -2032,8 +2032,9 @@ end function i3.set_fs(player) local name = player:get_player_name() local data = pdata[name] - local fs = make_fs(player, data) + if not data then return end + local fs = make_fs(player, data) player:set_inventory_formspec(fs) end