[Libreoffice-commits] core.git: cppuhelper/source unotools/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 15 07:28:23 UTC 2020


 cppuhelper/source/interfacecontainer.cxx      |    2 +-
 unotools/source/misc/eventlisteneradapter.cxx |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3a0c4574449fc2313306c4e0e39bb7416cc20657
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jan 15 08:42:05 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jan 15 08:27:52 2020 +0100

    convert OSL_ASSERT to assert
    
    and fix the one place triggering it
    
    Change-Id: I87ec57c6a92ed89fdacfcb0d650525eaeaa266b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86822
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 7b97c315343d..eac0683329bb 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -221,7 +221,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> &
 
 sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener )
 {
-    OSL_ASSERT( rListener.is() );
+    assert( rListener.is() );
     MutexGuard aGuard( rMutex );
     if( bInUse )
         copyAndResetInUse();
diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx
index c9f6b6f73ee9..d9736905de81 100644
--- a/unotools/source/misc/eventlisteneradapter.cxx
+++ b/unotools/source/misc/eventlisteneradapter.cxx
@@ -74,7 +74,8 @@ namespace utl
     {
         if (m_xComponent.is())
         {
-            m_xComponent->removeEventListener(m_xKeepMeAlive);
+            if (m_xKeepMeAlive.is())
+                m_xComponent->removeEventListener(m_xKeepMeAlive);
             m_xComponent.clear();
             m_xKeepMeAlive.clear();
         }


More information about the Libreoffice-commits mailing list