From f9f98e3a9c23007c8c1f3895761ad2f91d190e2a Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 26 Jul 2015 15:22:07 +0200 Subject: [PATCH] Prevent crash when breath is nil (connection error) --- mods/hudbars/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua index d67599a4..65d317e0 100755 --- a/mods/hudbars/init.lua +++ b/mods/hudbars/init.lua @@ -320,7 +320,7 @@ local function update_hud(player) if breath == 11 then hb.hide_hudbar(player, "breath") - else + elseif breath then hb.unhide_hudbar(player, "breath") hb.change_hudbar(player, "breath", math.min(breath, 10)) end