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

New commits:
commit f3e308fd3d29748d6a8fd1463df0a847a52a36d0
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 24 17:15:41 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 25 15:38:05 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

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