From 7552dfd8ecdbb230274ac5276e6fc67a459c0561 Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Thu, 4 Nov 2010 02:21:25 +0000 Subject: [PATCH] Sometimes self is corrupted when first mousing over a unit frame, before mousing over any world unit. Here's a temporary fix till I find the source of the problem. --- Modules/UnitTooltip/UnitTooltip.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua index 57b9dbc..d6f9fda 100644 --- a/Modules/UnitTooltip/UnitTooltip.lua +++ b/Modules/UnitTooltip/UnitTooltip.lua @@ -219,7 +219,7 @@ return "Alive" name = "Health", left = 'return "Health:"', right = [[ -if not UnitExists(unit) then self:Stop(); return self.lastHealth end +if not UnitExists(unit) and self.Stop then self:Stop(); return self.lastHealth end local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit) local r, g, b = HPColor(health, maxHealth) local value = "Unknown" @@ -241,7 +241,7 @@ return value return PowerName(unit) ]], right = [[ -if not UnitExists(unit) then self:Stop(); return self.lastMana end +if not UnitExists(unit) and self.Stop then self:Stop(); return self.lastMana end local mana = UnitMana(unit) local maxMana = UnitManaMax(unit) local r, g, b = PowerColor(nil, unit) -- 1.7.9.5