[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 23 12:27:08 UTC 2018
vcl/qt5/Qt5AccessibleWidget.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 509c017f5a6ee6b7c1bb9b61b36aef58a06afd27
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Oct 23 12:08:41 2018 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Tue Oct 23 14:26:45 2018 +0200
tdf#120803: avoid crash if no valid vcl::Window
when called from the destructor it is no longer alive
Change-Id: Ia68272253f9c459b2647a0bd389e833fb0b519e3
Reviewed-on: https://gerrit.libreoffice.org/62228
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index dbfa9ed57897..6b6832745b07 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -642,7 +642,10 @@ QAccessibleInterface* Qt5AccessibleWidget::customFactory(const QString& classnam
if (classname == QLatin1String("Qt5Widget") && object && object->isWidgetType())
{
Qt5Widget* pWidget = static_cast<Qt5Widget*>(object);
- return new Qt5AccessibleWidget(pWidget->m_pFrame->GetWindow()->GetAccessible());
+ vcl::Window* pWindow = pWidget->m_pFrame->GetWindow();
+
+ if (pWindow)
+ return new Qt5AccessibleWidget(pWindow->GetAccessible());
}
if (classname == QLatin1String("Qt5XAccessible") && object)
{
More information about the Libreoffice-commits
mailing list