Fix lua error if xp bar is hidden on login

This commit is contained in:
Andrew6810
2022-12-31 14:30:33 -07:00
parent df65fd107e
commit 7849fbea1b
+1 -1
View File
@@ -47,7 +47,7 @@ function mod:ExperienceBar_QuestXPUpdate(event)
self.questTotalXP = getQuestXP(self.db.experience.questXP.questCompletedOnly, self.db.experience.questXP.questCurrentZoneOnly)
if self.questTotalXP > 0 then
if self.questTotalXP > 0 and self.expBar.maxExp and self.expBar.curExp then
self.expBar.questBar:SetMinMaxValues(0, self.expBar.maxExp)
self.expBar.questBar:SetValue(min(self.expBar.curExp + self.questTotalXP, self.expBar.maxExp))
self.expBar.questBar:Show()