cid#1608390 Data race condition
Change-Id: I98a8addad50888e5969fce5bf47d67f96b06ecf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174359 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
9ea9c6f0fc
commit
3b60abdc94
1 changed files with 3 additions and 6 deletions
|
@ -1241,13 +1241,10 @@ const Reference< XContent > & Content_Impl::getContent_NoLock()
|
|||
|
||||
Reference< XCommandProcessor > Content_Impl::getCommandProcessor()
|
||||
{
|
||||
if ( !m_xCommandProcessor.is() )
|
||||
{
|
||||
std::unique_lock aGuard( m_aMutex );
|
||||
std::unique_lock aGuard( m_aMutex );
|
||||
|
||||
if ( !m_xCommandProcessor.is() )
|
||||
m_xCommandProcessor.set( getContent_NoLock(), UNO_QUERY );
|
||||
}
|
||||
if ( !m_xCommandProcessor.is() )
|
||||
m_xCommandProcessor.set( getContent_NoLock(), UNO_QUERY );
|
||||
|
||||
return m_xCommandProcessor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue