Preempt possible crash on nil in on_joinplayer.
* In mineclone5 a crash was reported to occur when deserialization of storage returned nil in on_joinplayer. https://git.minetest.land/ MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09 This commit uses a different, but equally effective fix.dyable-leather-armor
parent
e9ff2ba32a
commit
90311da514
|
@ -57,7 +57,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
local storage = {}
|
||||
local burn_data = player:get_meta():get_string("mcl_burning:data")
|
||||
if burn_data ~= "" then
|
||||
storage = minetest.deserialize(burn_data)
|
||||
storage = minetest.deserialize(burn_data) or storage
|
||||
end
|
||||
mcl_burning.storage[player] = storage
|
||||
if storage.burn_time and storage.burn_time > 0 then
|
||||
|
|
Loading…
Reference in New Issue