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:
Caolán McNamara
2024-10-17 20:25:15 +02:00
parent 4b675143b4
commit c2dda4579d
+3 -7
View File
@@ -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