From eb358d77291eba677141bab113dc27d7aabb0f3e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:44:04 +0200 Subject: Merging upstream version 4:24.2.2. Signed-off-by: Daniel Baumann --- accessibility/source/standard/vclxaccessiblelist.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'accessibility/source') diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index 36573dcbb3..00a4258f60 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -108,6 +108,12 @@ void SAL_CALL VCLXAccessibleList::disposing() { VCLXAccessibleComponent::disposing(); + disposeChildren(); + m_pListBoxHelper.reset(); +} + +void VCLXAccessibleList::disposeChildren() +{ // Dispose all items in the list. for (rtl::Reference& rxChild : m_aAccessibleChildren) { @@ -116,8 +122,6 @@ void SAL_CALL VCLXAccessibleList::disposing() } m_aAccessibleChildren.clear(); - - m_pListBoxHelper.reset(); } @@ -515,7 +519,7 @@ rtl::Reference VCLXAccessibleList::CreateChild(sal_Int32 void VCLXAccessibleList::HandleChangedItemList() { - m_aAccessibleChildren.clear(); + disposeChildren(); NotifyAccessibleEvent ( AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any()); -- cgit v1.2.3