extensions/source/update/check/updatecheck.cxx |    6 +++++-
 extensions/source/update/check/updatecheck.hxx |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9a35b933faf8f56884706d8b96b50d46536c0246
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Dec 10 12:26:35 2024 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Dec 16 12:41:37 2024 +0100

    cid#1606642 Data race condition
    
    Change-Id: I7b36a4632981a548c04b2bc31decc9be98200c37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178284
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 059e695005b7eb500058f8c1c6cf83eb92dad20b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178555

diff --git a/extensions/source/update/check/updatecheck.cxx 
b/extensions/source/update/check/updatecheck.cxx
index 41c05ac635fc..97aa043d3f87 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1182,7 +1182,6 @@ UpdateCheck::showDialog(bool forceCheck)
     }
 }
 
-
 void
 UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
 {
@@ -1253,6 +1252,11 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
     setUIState(eUIState, bSuppressBubble);
 }
 
+bool UpdateCheck::hasOfficeUpdate() const
+{
+    std::unique_lock aGuard(m_aMutex);
+    return m_aUpdateInfo.BuildId.getLength() > 0;
+}
 
 void
 UpdateCheck::setCheckFailedState()
diff --git a/extensions/source/update/check/updatecheck.hxx 
b/extensions/source/update/check/updatecheck.hxx
index 7af355bc41ea..7b38e3f0d271 100644
--- a/extensions/source/update/check/updatecheck.hxx
+++ b/extensions/source/update/check/updatecheck.hxx
@@ -93,7 +93,7 @@ public:
     bool shouldShowExtUpdDlg() const { return ( m_bShowExtUpdDlg && 
m_bHasExtensionUpdate ); }
     void showExtensionDialog();
     void setHasExtensionUpdates( bool bHasUpdates ) { m_bHasExtensionUpdate = 
bHasUpdates; }
-    bool hasOfficeUpdate() const { return (m_aUpdateInfo.BuildId.getLength() > 
0); }
+    bool hasOfficeUpdate() const;
 
     // DownloadInteractionHandler
     virtual bool downloadTargetExists(const OUString& rFileName) override;

Reply via email to