[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 10 12:42:10 UTC 2019
vcl/qt5/Qt5AccessibleWidget.cxx | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit d804d22c229a9a08bd50c348a0e933b0138385bf
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Sun Dec 30 16:41:07 2018 +0000
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Thu Jan 10 13:41:43 2019 +0100
tdf#122056: catch DisposedException to avoid crash w/ screen reader
The repro scenario is closing a slideshow with screen reader on.
Some object are already disposed by the time [full-screen] win with
presentation closes
Change-Id: I7e2ae7a5b694daaf7355ef93d87a998c9f2e345a
Reviewed-on: https://gerrit.libreoffice.org/65931
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index c2c1fdc2b7f8..efafab17f3cf 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -46,6 +46,7 @@
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/AccessibleImplementationHelper.hxx>
@@ -662,8 +663,18 @@ QAccessibleInterface* Qt5AccessibleWidget::childAt(int x, int y) const
{
if (!m_xAccessible.is())
return nullptr;
- Reference<XAccessibleComponent> xAccessibleComponent(m_xAccessible->getAccessibleContext(),
- UNO_QUERY);
+
+ Reference<XAccessibleContext> xAc;
+ try
+ {
+ xAc = m_xAccessible->getAccessibleContext();
+ }
+ catch (css::lang::DisposedException /*ex*/)
+ {
+ return nullptr;
+ }
+
+ Reference<XAccessibleComponent> xAccessibleComponent(xAc, UNO_QUERY);
return QAccessible::queryAccessibleInterface(
new Qt5XAccessible(xAccessibleComponent->getAccessibleAtPoint(awt::Point(x, y))));
}
More information about the Libreoffice-commits
mailing list