From 66b270c3b36713f7369961d0a2b7ec8f1179a657 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 8 Apr 2018 19:46:21 +0200 Subject: [PATCH] feigndeath: fix nil table index --- modules/feigndeath.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/feigndeath.lua b/modules/feigndeath.lua index 4f12e6c7..0f933b59 100644 --- a/modules/feigndeath.lua +++ b/modules/feigndeath.lua @@ -11,10 +11,10 @@ pfUI:RegisterModule("feigndeath", function () if event == "PLAYER_TARGET_CHANGED" and UnitIsDead("target") then healthscan:SetUnit("target") cache[UnitName("target")] = healthbar:GetValue() - elseif event == "UNIT_HEALTH" and UnitIsDead(arg1) then + elseif event == "UNIT_HEALTH" and UnitIsDead(arg1) and UnitName(arg1) then healthscan:SetUnit(arg1) cache[UnitName(arg1)] = healthbar:GetValue() - elseif event == "UNIT_HEALTH" then + elseif event == "UNIT_HEALTH" and UnitName(arg1) then cache[UnitName(arg1)] = nil end end)