Skip to content

Commit

Permalink
Another fix for freezing addon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed May 22, 2023
1 parent edaf28d commit 854a165
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions widgets/Section.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ function sectionProto:OnAcquire(container, name, category)
self.name = name
self.category = category or name
self.key = BuildSectionKey(name, category)
self.total = 0
self.height = 0
self:SetSizeInSlots(0, 0)
self.count = 0
self.total = 0
self.height = 0
self.container = container
self:RegisterMessage('AdiBags_OrderChanged', 'FullLayout')
self.Header:SetNormalFontObject(addon.fonts[string.lower(container.name)].sectionFont)
Expand Down Expand Up @@ -376,6 +376,10 @@ function sectionProto:FullLayout()
return self:Hide()
end

if self.total < 0 or self.count < 0 then
return
end

for button in pairs(self.buttons) do
button:Show()
tinsert(buttonOrder, button)
Expand Down

0 comments on commit 854a165

Please sign in to comment.