sw/source/core/unocore/unochart.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 6762578ee5d9c0b7670c5feea5b837130308a1be
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Sep 27 19:54:21 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Sep 27 22:37:36 2024 +0200

    use the same early return as the other ::dispose cases in this file
    
    as done with:
    
    commit 2bfd51eab364c6b00603e2fa1e9c354eec90dc7f
    CommitDate: Fri Jul 31 11:00:25 2020 +0200
    
        loplugin:flatten in sw/core/unocore
    
    for consistency with the rest, no logic change intended
    
    Change-Id: I69cc24c8ba4ec3aa483e869e68b79ab8b406afff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174067
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 996f96cfcc63..bd7c95880c50 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2661,16 +2661,16 @@ void SAL_CALL SwChartLabeledDataSequence::dispose(  )
         if (!m_bDisposed)
             m_bDisposed = true;
     }
-    if (bMustDispose)
-    {
-        m_bDisposed = true;
+    if (!bMustDispose)
+        return;
 
-        // require listeners to release references to this object
-        lang::EventObject aEvtObj( static_cast< 
chart2::data::XLabeledDataSequence * >(this) );
-        std::unique_lock aGuard( GetChartMutex() );
-        m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
-        m_aEventListeners.disposeAndClear( aGuard, aEvtObj );
-    }
+    m_bDisposed = true;
+
+    // require listeners to release references to this object
+    lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence 
* >(this) );
+    std::unique_lock aGuard( GetChartMutex() );
+    m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
+    m_aEventListeners.disposeAndClear( aGuard, aEvtObj );
 }
 
 void SAL_CALL SwChartLabeledDataSequence::addEventListener(

Reply via email to