From edaf28d844b7367c474b1be2e258b846b0bfbff3 Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Mon, 22 May 2023 15:56:11 -0700 Subject: [PATCH] Fixed a bug that caused a total freeze (and crash) in some cases. --- widgets/Section.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/Section.lua b/widgets/Section.lua index 7910962..b1a1d44 100644 --- a/widgets/Section.lua +++ b/widgets/Section.lua @@ -128,6 +128,8 @@ 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.container = container @@ -144,6 +146,8 @@ function sectionProto:OnRelease() self.name = nil self.category = nil self.container = nil + self.total = 0 + self.height = 0 end function sectionProto:UpdateFont()