comphelper/source/property/propmultiplex2.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 5a384cc2337183d13a3cafad389714a12eab7c1f
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Oct 17 17:25:58 2024 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Fri Oct 18 08:48:59 2024 +0200

    tdf#163486: PVS: recurring check
    
    V571: Recurring check. The 'if (m_pListener)' condition was already 
verified in line 104.
    
    After 4d07ee9a54e0b929ab116b08227e20f4a9c330e9
    "loplugin:virtualdead"
    
    Change-Id: I12e90376211f3625cdda482909a96d43fe55cc3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175096
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/comphelper/source/property/propmultiplex2.cxx 
b/comphelper/source/property/propmultiplex2.cxx
index b9d7719c4e1d..a2a1599c4b2e 100644
--- a/comphelper/source/property/propmultiplex2.cxx
+++ b/comphelper/source/property/propmultiplex2.cxx
@@ -101,12 +101,9 @@ void OPropertyChangeMultiplexer2::onListenerDestruction()
 void SAL_CALL OPropertyChangeMultiplexer2::disposing(const EventObject& 
/*_rSource*/)
 {
     std::unique_lock g(m_rMutex);
+    // disconnect the listener
     if (m_pListener)
-    {
-        // disconnect the listener
-        if (m_pListener) // may have been reset whilst calling into _disposing
-            m_pListener->setAdapter(g, nullptr);
-    }
+        m_pListener->setAdapter(g, nullptr);
 
     m_pListener = nullptr;
     m_bListening = false;

Reply via email to