summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-29 09:50:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-29 12:53:13 +0200
commita12633a9982d34eb8f0b714d5f25cff3040f33ab (patch)
tree0b048223d97641461fa7b4322737a06005b1a262 /svx
parent4025ab7a19e730501877040814096c2fa47cefc3 (diff)
tdf#155515 tdf#155528 crash on exit
regression from commit 3b7db802731826b6cc3b55100470b0c61c1f2dfa Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu May 4 10:06:14 2023 +0200 tdf#105404 [API CHANGE] add index to accessiblity change event Fix a handful of things related to accessibility objects being destructed later than they should and consequently trying at access other stuff that has already been destructed. (1) AccessibleControlShape::disposing check the window still exists (2) DocumentFocusListener::notifyEvent, handle INVALIDATE_ALL_CHILDREN (3) hold DocumentFocusListener by weak reference in GtkSalData, so that it dies when the related UI widgets die Change-Id: I38bf68a748b37e6abc4a8cfcc961436728e081bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index bf085bb753a4..8fe42db6dada 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -629,11 +629,14 @@ void SAL_CALL AccessibleControlShape::disposing()
if ( m_bWaitingForControl )
{
OSL_FAIL( "AccessibleControlShape::disposing: this should never happen!" );
- Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow()->GetOutDev(), maShapeTreeInfo.GetSdrView() );
- if ( xContainer.is() )
+ if (auto pWindow = maShapeTreeInfo.GetWindow())
{
- m_bWaitingForControl = false;
- xContainer->removeContainerListener( this );
+ Reference< XContainer > xContainer = lcl_getControlContainer( pWindow->GetOutDev(), maShapeTreeInfo.GetSdrView() );
+ if ( xContainer.is() )
+ {
+ m_bWaitingForControl = false;
+ xContainer->removeContainerListener( this );
+ }
}
}