filter/source/xsltfilter/LibXSLTTransformer.cxx | 6 +++--- vcl/source/window/dndlistenercontainer.cxx | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-)
New commits: commit 9c59f0bc666ff841bd51eaaddbb04bb6470a13eb Author: Noel Grandin <[email protected]> AuthorDate: Thu Oct 3 16:02:23 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Oct 3 18:44:18 2024 +0200 cid#1556833 Data race condition Change-Id: I8b6b929240d9bd730480c5559bc40f39e9c93511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174430 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index 017fad2c8548..4defe3ff160d 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -315,10 +315,10 @@ namespace XSLT std::scoped_lock<std::mutex> g(m_mutex); m_tcontext = tcontext; } - oh->registercontext(m_tcontext); - xsltQuoteUserParams(m_tcontext, params.data()); + oh->registercontext(tcontext); + xsltQuoteUserParams(tcontext, params.data()); result = xsltApplyStylesheetUser(styleSheet, doc, nullptr, nullptr, nullptr, - m_tcontext); + tcontext); } if (result) commit 6f7265ef036ca421654670b2b5fd59222a99ecd7 Author: Noel Grandin <[email protected]> AuthorDate: Thu Oct 3 15:59:45 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Oct 3 18:44:06 2024 +0200 cid#1608220 Data race condition Change-Id: I7ff30128d663ca3524dc95ef99ef8c64dd158643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174429 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/vcl/source/window/dndlistenercontainer.cxx b/vcl/source/window/dndlistenercontainer.cxx index 9ff128c808bb..df8b6114f93b 100644 --- a/vcl/source/window/dndlistenercontainer.cxx +++ b/vcl/source/window/dndlistenercontainer.cxx @@ -384,11 +384,12 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( sal_Int8 dragAction, sal_ void SAL_CALL DNDListenerContainer::acceptDrag( sal_Int8 dragOperation ) { - if( m_xDropTargetDragContext.is() ) - { - m_xDropTargetDragContext->acceptDrag( dragOperation ); - m_xDropTargetDragContext.clear(); - } + std::unique_lock g(m_aMutex); + if( !m_xDropTargetDragContext ) + return; + auto xTmpDragContext = std::move(m_xDropTargetDragContext); + g.unlock(); + xTmpDragContext->acceptDrag( dragOperation ); } void SAL_CALL DNDListenerContainer::rejectDrag( )
