fix on_quit crash

This commit is contained in:
MisterE 2022-10-31 08:15:56 -04:00
parent b5633ad931
commit 97c21bbb25

View File

@ -21,7 +21,7 @@ end
local function sumo_remove_controls_hud(p_name)
player = minetest.get_player_by_name(p_name)
if not player then return end
if huds[p_name] ~= nil then
if huds[p_name] ~= nil and huds[p_name].controls ~= nil then
player:hud_remove(huds[p_name].controls)
huds[p_name].controls = nil
end