From 2acb931960672cb120d9a908f9c7ba235f731dc1 Mon Sep 17 00:00:00 2001 From: Parnic Date: Wed, 17 Nov 2010 03:57:38 +0000 Subject: [PATCH] - added protection against potential nil access reported by a user. i can't reproduce it, though --- modules/TargetHealth.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index 537a274..2885523 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -873,6 +873,10 @@ end function IceTargetHealth.prototype:SetTexLoc(texframe, xpos, ypos, anchorFrom, anchorTo) + if not texframe then + return nil + end + texframe:Show() texframe:ClearAllPoints() texframe:SetPoint(anchorFrom or "TOPLEFT", self.frame, anchorTo or "TOPLEFT", xpos or 0, ypos or 0) @@ -880,6 +884,10 @@ end function IceTargetHealth.prototype:SetTexScale(texframe, width, height, scale) + if not texframe then + return nil + end + texframe:SetWidth(width * scale) texframe:SetHeight(height * scale) end