fix some crash related to offhand

This commit is contained in:
Blue Blancmange 2022-07-17 20:24:09 +01:00
parent 801ea2623c
commit 37fb8b2f88
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,9 @@ end
minetest.register_globalstep(function(dtime)
for _, player in pairs(minetest.get_connected_players()) do
if not mcl_offhand[player] then
goto continue
end
local itemstack = mcl_offhand.get_offhand(player)
local offhand_item = itemstack:get_name()
local offhand_hud = mcl_offhand[player].hud
@ -148,6 +151,7 @@ minetest.register_globalstep(function(dtime)
remove_hud(player, index)
end
end
::continue::
end
end)