svx/source/accessibility/ChildrenManagerImpl.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit e168e20b519885789cfafbb7d4726d5c79bd2aac Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Fri Nov 10 17:59:11 2023 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Sun Nov 12 01:39:55 2023 +0100 tdf#158169 take no actions in disposed incarnation Using the described steps in the bug report it is possible to have an already disposed incarnation of ChildrenManagerImpl that gets called with notifyEvent. If exposed it is necessary not to execute actions, but to inform the caller by triggering a lang::DisposedException(). The SfxBaseModel::notifyEvent that executes this will then remove the instance from it's list. Change-Id: Ie39e37d6e55ea66f441e732b612774b18d7c3ca1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159306 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> (cherry picked from commit 23e9a4cf1eec75cdd40a695ecae2af9b952178d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159242 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 2926087060d3..93fe45a21b32 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -679,6 +679,11 @@ void SAL_CALL ChildrenManagerImpl::notifyEvent ( const document::EventObject& rEventObject) { + // tdf#158169 if we are already disposed, execute no actions, but inform the + // caller that we are disposed + if ( m_bDisposed ) + throw lang::DisposedException(); + if (rEventObject.EventName == "ShapeInserted") AddShape (Reference<drawing::XShape>(rEventObject.Source, uno::UNO_QUERY)); else if (rEventObject.EventName == "ShapeRemoved")