forked from mtcontrib/minetest_hudbars
Add nil check in hb.change_hudbar
This commit is contained in:
parent
2ffcd94dd6
commit
2eb2df946b
3
init.lua
3
init.lua
|
@ -315,6 +315,9 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon
|
|||
end
|
||||
|
||||
local name = player:get_player_name()
|
||||
if not hudtable.hudstate[name] then
|
||||
return false
|
||||
end
|
||||
local hudtable = hb.get_hudtable(identifier)
|
||||
local value_changed, max_changed = false, false
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user