From a52931f9863c74e1076e073435a1db574ebc5ba2 Mon Sep 17 00:00:00 2001 From: Johannes Fritz Date: Fri, 24 Mar 2023 15:53:07 -0500 Subject: [PATCH] Fix mcl_skins crash --- mods/PLAYER/mcl_skins/edit_skin.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/PLAYER/mcl_skins/edit_skin.lua b/mods/PLAYER/mcl_skins/edit_skin.lua index 3ced41d6d..f4f6fe90f 100644 --- a/mods/PLAYER/mcl_skins/edit_skin.lua +++ b/mods/PLAYER/mcl_skins/edit_skin.lua @@ -139,6 +139,10 @@ minetest.register_on_joinplayer(function(player) skin = minetest.deserialize(skin) end if skin then + -- If the player moves a slider and then quickly exits the game, form_send_job gets saved. + -- This should never have been put in with the skin data in the first place. + skin.form_send_job = nil + mcl_skins.players[player] = skin else if math.random() > 0.5 then @@ -424,6 +428,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) -- Cancel formspec resend after scrollbar move if mcl_skins.players[player].form_send_job then mcl_skins.players[player].form_send_job:cancel() + mcl_skins.players[player].form_send_job = nil end if fields.quit then