From 4c2f3f2b7cea5b132d7485b4d54def1fe72b8e46 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 3 Jan 2021 14:22:19 +0100 Subject: [PATCH] Fix possible crash in mcl_craftguide --- mods/HELP/mcl_craftguide/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 86bd742a99..2474d20705 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1108,8 +1108,12 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] + local inv_items = data.inv_items + if not inv_items then + inv_items = {} + end - meta:set_string("inv_items", serialize(data.inv_items)) + meta:set_string("inv_items", serialize(inv_items)) end M.register_on_leaveplayer(function(player)