Fix crash when removing HUD's (#23)

This commit is contained in:
David Leal 2020-11-13 20:43:15 -06:00 committed by GitHub
parent faf3ed7e30
commit 1fa1fd132f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,7 @@ minetest.register_node("anvil:anvil", {
})
end
minetest.after(2, function()
if( puncher ) then
if( puncher ) and ( hud2 ) and ( hud3 ) then
puncher:hud_remove(hud2)
puncher:hud_remove(hud3)
end