cid#1607671 Data race condition

Change-Id: Id2e87001b77087a072705ba7ffa1a2190220a082
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178074
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-12-07 14:39:38 +00:00
parent 32767d081e
commit 18399240f2

View file

@ -1129,7 +1129,10 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
if( bMT_EMAIL )
{
// Reset internal mail accounting data
m_pImpl->m_xLastMessage.clear();
{
std::unique_lock aGuard(m_pImpl->m_aAllEmailSendMutex);
m_pImpl->m_xLastMessage.clear();
}
xMailDispatcher.set( new MailDispatcher(rMergeDescriptor.xSmtpServer) );
xMailListener = new MailDispatcherListener_Impl( *this );