From f3e308fd3d29748d6a8fd1463df0a847a52a36d0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 Sep 2024 17:15:41 +0100 Subject: cid#1606875 Data race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- framework/source/fwe/helper/titlehelper.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 5fc85505edad..422982ea629e 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -242,15 +242,18 @@ void SAL_CALL TitleHelper::disposing(const css::lang::EventObject& aEvent) void TitleHelper::impl_sendTitleChangedEvent () { css::uno::Reference xOwner; + OUString sTitle; // SYNCHRONIZED -> { std::unique_lock aLock(m_aMutex); xOwner = m_xOwner; + + sTitle = m_sTitle; } // <- SYNCHRONIZED - css::frame::TitleChangedEvent aEvent(xOwner, m_sTitle); + css::frame::TitleChangedEvent aEvent(xOwner, sTitle); if( ! aEvent.Source.is() ) return; -- cgit v1.2.3