summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppuhelper/source/interfacecontainer.cxx2
-rw-r--r--unotools/source/misc/eventlisteneradapter.cxx3
2 files changed, 3 insertions, 2 deletions
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();
}