summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-10 12:26:35 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-16 12:41:37 +0100
commit9a35b933faf8f56884706d8b96b50d46536c0246 (patch)
treef87d6f4234f2984419f59a1ba4f7b7b407365dbd /extensions
parent7e86ac7660b7dccad98cd8b7e4062224e1f9f7f7 (diff)
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 <caolan.mcnamara@collabora.com> (cherry picked from commit 059e695005b7eb500058f8c1c6cf83eb92dad20b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178555
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/updatecheck.cxx6
-rw-r--r--extensions/source/update/check/updatecheck.hxx2
2 files changed, 6 insertions, 2 deletions
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;