From 0d0f2e7b1f6851b07e65b42aca40f37a5f311deb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 6 Oct 2024 21:38:10 +0200 Subject: 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 --- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'desktop/source') 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; -- cgit