cooldown-numbers: check frame before using it

This commit is contained in:
shagu
2022-07-17 22:49:16 +02:00
parent 7d5700972f
commit 38c80d28c0
+9 -7
View File
@@ -76,14 +76,16 @@ local function SetCooldown(this, start, duration, enable)
CreateCoolDown(this, start, duration)
end
if start > 0 and duration > 0 and (not enable or enable > 0) then
this.cooldowntext:Show()
else
this.cooldowntext:Hide()
end
if this.cooldowntext then
if start > 0 and duration > 0 and (not enable or enable > 0) then
this.cooldowntext:Show()
else
this.cooldowntext:Hide()
end
this.cooldowntext.start = start
this.cooldowntext.duration = duration
this.cooldowntext.start = start
this.cooldowntext.duration = duration
end
end
module.enable = function(self)