diff --git a/IceHUD.lua b/IceHUD.lua index 728c568..01796b9 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -1117,6 +1117,10 @@ function IceHUD:GetDebuffCount(unit, ability, onlyMine, matchByName) end function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName) + if not unit then + return 0 + end + if unit == "main hand weapon" or unit == "off hand weapon" then local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo() diff --git a/modules/CustomCount.lua b/modules/CustomCount.lua index dd50ea0..5bfb2d9 100644 --- a/modules/CustomCount.lua +++ b/modules/CustomCount.lua @@ -405,7 +405,7 @@ function IceCustomCount.prototype:Enable(core) self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateCustomCount") self:RegisterEvent("PLAYER_DEAD", "UpdateCustomCount") - self.unit = self.moduleSettings.auraTarget + self.unit = self.moduleSettings.auraTarget or "player" if not tonumber(self.moduleSettings.maxCount) or tonumber(self.moduleSettings.maxCount) <= 0 then self.moduleSettings.maxCount = 5