[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Dec 19 05:47:06 UTC 2018
vcl/qt5/Qt5AccessibleWidget.cxx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 20da54d941083a947d8890c2f6b0e8edf3bc9ed5
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Dec 18 18:31:08 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Dec 19 06:46:44 2018 +0100
tdf#122055: catch RuntimeException if a11y context no longer alive
otherwise Desktop::Main will do it and soffice will crash w/ empty
error msg
Change-Id: I56768909227a6ff158ae353e1eff9b249d6ba9d4
Reviewed-on: https://gerrit.libreoffice.org/65357
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit d41bc9bd9359eb83f807fdfa72dbde0831f39be8)
Reviewed-on: https://gerrit.libreoffice.org/65384
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index 9773b2875050..c2c1fdc2b7f8 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -636,7 +636,22 @@ void* Qt5AccessibleWidget::interface_cast(QAccessible::InterfaceType t)
bool Qt5AccessibleWidget::isValid() const
{
- return m_xAccessible.is() && m_xAccessible->getAccessibleContext().is();
+ if (m_xAccessible.is())
+ {
+ try
+ {
+ // getAccessibleContext throws RuntimeException if context is no longer alive
+ Reference<XAccessibleContext> xAc = m_xAccessible->getAccessibleContext();
+ return xAc.is();
+ }
+ // so let's catch it here, cuz otherwise soffice falls flat on its face
+ // with FatalError and nothing else
+ catch (css::uno::RuntimeException /*ex*/)
+ {
+ return false;
+ }
+ }
+ return false;
}
QObject* Qt5AccessibleWidget::object() const { return nullptr; }
More information about the Libreoffice-commits
mailing list