Fix potential minetest.after crash in hud mod

This commit is contained in:
Wuzzy 2020-03-31 02:08:25 +02:00
parent 537a6f7078
commit 392c89b88d
1 changed files with 6 additions and 4 deletions

View File

@ -15,8 +15,10 @@ local function costum_hud(player)
end
minetest.register_on_joinplayer(function(player)
minetest.after(0.5, function()
hide_builtin(player)
costum_hud(player)
end)
minetest.after(0.5, function(player)
if player and player:is_player() then
hide_builtin(player)
costum_hud(player)
end
end, player)
end)