framework/source/fwe/helper/titlehelper.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5f76f598b613dd209149988d29a90f86be45c8fe
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 24 17:15:41 2024 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Sep 26 10:42:59 2024 +0200

    cid#1606875 Data race condition
    
    Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit f3e308fd3d29748d6a8fd1463df0a847a52a36d0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173917
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

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<css::uno::XInterface> 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;

Reply via email to