From 12fe7de679a3fbc595a8e2ac4d0836fd852387a8 Mon Sep 17 00:00:00 2001 From: Mikeprod Date: Mon, 17 Apr 2017 10:57:02 +0200 Subject: [PATCH] Fixed the annoying error when world ping is disabled --- modules/system.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system.lua b/modules/system.lua index 468965f..b3f98ad 100644 --- a/modules/system.lua +++ b/modules/system.lua @@ -80,7 +80,9 @@ function SystemModule:Refresh() if db.modules.system.showWorld then self.worldPingText:SetText('000'..MILLISECONDS_ABBR) else - self.worldPingText:SetText('') + if self.worldPing then + self.worldPingText:SetText('') + end end self.pingText:SetText('000'..MILLISECONDS_ABBR) -- get the widest we can be @@ -137,9 +139,7 @@ function SystemModule:CreateFrames() self.pingFrame = self.pingFrame or CreateFrame('BUTTON', nil, self.systemFrame) self.pingIcon = self.pingIcon or self.pingFrame:CreateTexture(nil, 'OVERLAY') self.pingText = self.pingText or self.pingFrame:CreateFontString(nil, 'OVERLAY') - if xb.db.profile.modules.system.showWorld then - self.worldPingText = self.worldPingText or self.pingFrame:CreateFontString(nil, 'OVERLAY') - end + self.worldPingText = self.worldPingText or self.pingFrame:CreateFontString(nil, 'OVERLAY') end function SystemModule:HoverFunction() -- 1.7.9.5