mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
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.
This commit is contained in:
parent
e9ff2ba32a
commit
90311da514
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue