From 30cc420cbe6ec6045535291afb96c3282492f345 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 15 Apr 2017 15:51:51 +0200 Subject: [PATCH] tooltip: fix nil error --- modules/tooltip.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 4f8771aa..011706d4 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -64,7 +64,10 @@ CreateBackdrop(GameTooltip, nil, nil, alpha) if hp and hpm then if hp >= 1000 then hp = round(hp / 1000, 1) .. "k" end if hpm >= 1000 then hpm = round(hpm / 1000, 1) .. "k" end - pfUI.tooltipStatusBar.HP:SetText(hp .. " / " .. hpm) + + if pfUI.tooltipStatusBar and pfUI.tooltipStatusBar.HP then + pfUI.tooltipStatusBar.HP:SetText(hp .. " / " .. hpm) + end end end)