Fix possible crash in mcl_craftguide
This commit is contained in:
parent
3390370441
commit
4c2f3f2b7c
1 changed files with 5 additions and 1 deletions
|
@ -1108,8 +1108,12 @@ if progressive_mode then
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local data = player_data[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
|
end
|
||||||
|
|
||||||
M.register_on_leaveplayer(function(player)
|
M.register_on_leaveplayer(function(player)
|
||||||
|
|
Reference in a new issue