summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-03 09:01:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-03 08:09:17 +0000
commit5c4d4b370d2f6645c797c626d407013702f474c7 (patch)
treeb030628ea3133a7a632cef26a3ef8472682649a0 /svtools
parent4cd6cba3edcba6497220924acc6716ea6027e559 (diff)
tdf#153926 crash when trying to change language for selection
regression from commit 5032262fccd0ef7f274323ae481b3230ffd42d3a Author: Noel Grandin <noel.grandin@collabora.co.uk> 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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx11
1 files changed, 9 insertions, 2 deletions
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<PropertyValue> 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<std::mutex>& /*rGuard*/,
+ const OUString& sCommandURL,
+ const css::uno::Sequence< css::beans::PropertyValue >& rArgs,
+ const OUString& sTarget )
+{
try
{