summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-10-06 21:38:10 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-10-22 15:28:46 +0200
commit09cc2c84bcfa1c48cafb35353008a014952b0908 (patch)
treec28ab501f733a7f211e863d050d2c50cafb9c8cb
parent98c886ae93526a38af825ac66627e1f2d5d4d073 (diff)
cid#1606611 Data race condition
and cid#1607663 Data race condition cid#1606843 Data race condition cid#1608340 Check of thread-shared field evades lock acquisition Change-Id: I97b82d4302ead6b96ae19c15502c427952df2ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175401
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 4fe7a9622545..2d978ce080f0 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -839,9 +839,9 @@ void ExtMgrDialog::showProgress( bool _bStart )
void ExtMgrDialog::updateProgress( const tools::Long nProgress )
{
+ std::unique_lock aGuard( m_aMutex );
if ( m_nProgress != nProgress )
{
- std::unique_lock aGuard( m_aMutex );
m_nProgress = nProgress;
m_aIdle.Start();
}
@@ -945,6 +945,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn, weld::Button&, void)
IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl, Timer *, void)
{
+ std::unique_lock aGuard( m_aMutex );
if ( m_bStopProgress )
{
m_bHasProgress = false;