From bbd1eaeb4f8a923d861aae15264b2d4138590642 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 31 Aug 2023 14:47:06 +0200 Subject: a11y: Re-add check for empty reference in VCLXAccessibleTabControl It got lost with commit a3f77a61c03340b79930e89d5c4045d814b93edf Date: Wed Aug 30 14:43:18 2023 +0200 use concrete type for VCLXAccessibleTabControl::m_aAccessibleChildren and resulted in a crash when e.g. doing the following with the qt6 VCL plugin on Linux: 1) open attachment 189287 from tdf#104833 2) "Tools" -> "Macros" -> "Organize Dialogs" 3) select the dialog from the doc 4) select "Edit" Change-Id: I2c4aea951976738c575943a64d01eaac2766fdd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156343 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- accessibility/source/standard/vclxaccessibletabcontrol.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index 0855b0f177aa..a0990d51febd 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -218,7 +218,10 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin // dispose all tab pages for (const rtl::Reference& i : m_aAccessibleChildren) - i->dispose(); + { + if (i.is()) + i->dispose(); + } m_aAccessibleChildren.clear(); } -- cgit