cid#1555171 Data race condition
Change-Id: Ibb49dbd5ce386c4e31c1dfbacb23477d1a08a5ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175069 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -296,13 +296,9 @@ Reference< XInterface > OInstanceProvider::getInstance( const OUString & rName )
|
||||
}
|
||||
else if (_bSingleInstance)
|
||||
{
|
||||
{
|
||||
std::lock_guard aGuard( _aSingleInstanceMutex );
|
||||
if (! _xSingleInstance.is())
|
||||
{
|
||||
_xSingleInstance = createInstance();
|
||||
}
|
||||
}
|
||||
std::lock_guard aGuard(_aSingleInstanceMutex);
|
||||
if (!_xSingleInstance.is())
|
||||
_xSingleInstance = createInstance();
|
||||
xRet = _xSingleInstance;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user