summaryrefslogtreecommitdiffstats
path: root/accessibility
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
commite3cf16e6fbf8d39cad8762f002b6db1d4f61ed36 (patch)
tree3c1753125149dcf36ba42a57f1574369e8524225 /accessibility
parentAdding debian version 4:24.2.2-3. (diff)
downloadlibreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.tar.xz
libreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.zip
Merging upstream version 4:24.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index acb1d25471..c9f4546c12 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -630,9 +630,14 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
if ( pItemWindow )
{
Reference< XAccessible> xParent = xChild;
- rtl::Reference<OToolBoxWindowItem> xChild2( new OToolBoxWindowItem(0,::comphelper::getProcessComponentContext(),pItemWindow->GetAccessible(),xParent) );
- pItemWindow->SetAccessible(xChild2);
- xChild->SetChild( xChild2 );
+ auto const xInnerAcc(pItemWindow->GetAccessible());
+ if (xInnerAcc) // else child is being disposed - avoid crashing
+ {
+ rtl::Reference<OToolBoxWindowItem> xChild2(new OToolBoxWindowItem(0,
+ ::comphelper::getProcessComponentContext(), xInnerAcc, xParent));
+ pItemWindow->SetAccessible(xChild2);
+ xChild->SetChild( xChild2 );
+ }
}
if ( nHighlightItemId > ToolBoxItemId(0) && nItemId == nHighlightItemId )
xChild->SetFocus( true );