summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/fwe/helper/undomanagerhelper.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx
index 582335f3d71e..27780dc2719e 100644
--- a/framework/source/fwe/helper/undomanagerhelper.cxx
+++ b/framework/source/fwe/helper/undomanagerhelper.cxx
@@ -201,6 +201,8 @@ namespace framework
{
private:
::osl::Mutex m_aMutex;
+ /// Use different mutex for listeners to prevent ABBA deadlocks
+ ::osl::Mutex m_aListenerMutex;
std::mutex m_aQueueMutex;
bool m_bAPIActionRunning;
bool m_bProcessingEvents;
@@ -224,8 +226,8 @@ namespace framework
:m_bAPIActionRunning( false )
,m_bProcessingEvents( false )
,m_nLockCount( 0 )
- ,m_aUndoListeners( m_aMutex )
- ,m_aModifyListeners( m_aMutex )
+ ,m_aUndoListeners( m_aListenerMutex )
+ ,m_aModifyListeners( m_aListenerMutex )
,m_rUndoManagerImplementation( i_undoManagerImpl )
{
getUndoManager().AddUndoListener( *this );