diff --git a/mods/ENTITIES/mcl_burning/init.lua b/mods/ENTITIES/mcl_burning/init.lua index 8133a1fe36..039d295b73 100644 --- a/mods/ENTITIES/mcl_burning/init.lua +++ b/mods/ENTITIES/mcl_burning/init.lua @@ -67,6 +67,13 @@ end) local function on_leaveplayer(player) local storage = mcl_burning.storage[player] + if not storage then + -- For some unexplained reasons, mcl_burning.storage can be `nil` here. + -- Logging this exception to assist in finding the cause of this. + minetest.log("warning", "on_leaveplayer: missing mcl_burning.storage " + .. "for player " .. player:get_player_name()) + storage = {} + end storage.fire_hud_id = nil player:get_meta():set_string("mcl_burning:data", minetest.serialize(storage)) mcl_burning.storage[player] = nil