From 5c4d4b370d2f6645c797c626d407013702f474c7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 3 Mar 2023 09:01:40 +0200 Subject: tdf#153926 crash when trying to change language for selection regression from commit 5032262fccd0ef7f274323ae481b3230ffd42d3a Author: Noel Grandin Date: Tue Feb 21 15:05:37 2023 +0200 BaseMutex->std::mutex in PopupMenuControllerBase Change-Id: I46b6458a809659845de26059fcab4772e5089ce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148161 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/uno/popupmenucontrollerbase.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'svtools') diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index e74bbc32b655..61df2a4645af 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -111,7 +111,7 @@ void SAL_CALL PopupMenuControllerBase::itemSelected( const awt::MenuEvent& rEven if( m_xPopupMenu.is() ) { Sequence aArgs; - dispatchCommand( m_xPopupMenu->getCommand( rEvent.MenuId ), aArgs ); + dispatchCommandImpl( aLock, m_xPopupMenu->getCommand( rEvent.MenuId ), aArgs, OUString() ); } } @@ -120,8 +120,15 @@ void PopupMenuControllerBase::dispatchCommand( const OUString& sCommandURL, const OUString& sTarget ) { std::unique_lock aLock( m_aMutex ); - throwIfDisposed(aLock); + dispatchCommandImpl(aLock, sCommandURL, rArgs, sTarget); +} + +void PopupMenuControllerBase::dispatchCommandImpl( std::unique_lock& /*rGuard*/, + const OUString& sCommandURL, + const css::uno::Sequence< css::beans::PropertyValue >& rArgs, + const OUString& sTarget ) +{ try { -- cgit