Fix lua error if xp bar is hidden on login
This commit is contained in:
parent
df65fd107e
commit
7849fbea1b
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue