diff options
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/a11y/atkselection.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/a11y/atkselection.cxx b/vcl/unx/gtk3/a11y/atkselection.cxx index 91759e8d0b21..22d515f1b6fa 100644 --- a/vcl/unx/gtk3/a11y/atkselection.cxx +++ b/vcl/unx/gtk3/a11y/atkselection.cxx @@ -141,7 +141,13 @@ selection_remove_selection( AtkSelection *selection, = getSelection( selection ); if( pSelection.is() ) { - pSelection->deselectAccessibleChild( i ); + css::uno::Reference<css::accessibility::XAccessible> xAcc = pSelection->getSelectedAccessibleChild(i); + if (!xAcc.is()) + return false; + + css::uno::Reference<css::accessibility::XAccessibleContext> xAccContext = xAcc->getAccessibleContext(); + const sal_Int32 nChildIndex = xAccContext->getAccessibleIndexInParent(); + pSelection->deselectAccessibleChild(nChildIndex); return true; } } |