Skip to content

Commit 28f0b39

Browse files
committed
Fix potential hudbar crash
1 parent 3a4f242 commit 28f0b39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mods/other/minetest_hudbars/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ function hb.hide_hudbar(player, identifier)
416416
if not player_exists(player) then return false end
417417
local name = player:get_player_name()
418418
local hudtable = hb.get_hudtable(identifier)
419-
if hudtable == nil then return false end
419+
if hudtable == nil or not hudtable.hudstate[name] then return false end
420420
if hudtable.hudstate[name].hidden == true then return true end
421421
if hb.settings.bar_type == "progress_bar" then
422422
if hudtable.hudids[name].icon ~= nil then

0 commit comments

Comments
 (0)