Commit 5bc8aaeb authored by Ivaria's avatar Ivaria

Additional assertions for pet target units that may not exist

parent 20c793ee
......@@ -1050,7 +1050,7 @@ local function VUHDO_updateAllAggro()
tInfo["aggro"] = true;
end
tTarget = tInfo["targetUnit"];
if not UnitIsFriend(tUnit, tTarget) then
if tTarget and UnitExists(tTarget) and not UnitIsFriend(tUnit, tTarget) then
if VUHDO_INTERNAL_TOGGLES[14] then -- VUHDO_UPDATE_AGGRO
_, _, tThreatPerc = UnitDetailedThreatSituation(tUnit, tTarget);
tInfo["threatPerc"] = tThreatPerc or 0;
......@@ -1058,7 +1058,7 @@ local function VUHDO_updateAllAggro()
tAggroUnit = VUHDO_RAID_NAMES[UnitName(tTarget .. "target")];
if tAggroUnit then
if tAggroUnit and UnitExists(tAggroUnit) then
if VUHDO_INTERNAL_TOGGLES[14] then -- VUHDO_UPDATE_AGGRO
_, _, tThreatPerc = UnitDetailedThreatSituation(tAggroUnit, tTarget);
VUHDO_RAID[tAggroUnit]["threatPerc"] = tThreatPerc or 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment