summaryrefslogtreecommitdiff
path: root/cppuhelper/source/interfacecontainer.cxx
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2001-05-17 11:56:41 +0000
committerJörg Budischewski <jbu@openoffice.org>2001-05-17 11:56:41 +0000
commitbc6cd83a673452681f0aeb565ebd2ddbd37ebfb2 (patch)
tree900707d6019d16c19a23906b9999f372fae15295 /cppuhelper/source/interfacecontainer.cxx
parentee19c132d5a001abaec5df0af2b7bd400c4b6a0d (diff)
#87171# Calling OInterfaceContainerHelper::removeInterface with an empty reference does not crash anymore(it's still asserted)
Diffstat (limited to 'cppuhelper/source/interfacecontainer.cxx')
-rw-r--r--cppuhelper/source/interfacecontainer.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 3fe881748abe..954ea219ef8a 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: interfacecontainer.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: jl $ $Date: 2001-03-12 13:39:32 $
+ * last change: $Author: jbu $ $Date: 2001-05-17 12:56:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -306,7 +306,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> &
sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) SAL_THROW( () )
{
- assert( rListener.is() );
+ OSL_ASSERT( rListener.is() );
MutexGuard aGuard( rMutex );
if( bInUse )
copyAndResetInUse();
@@ -352,7 +352,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface
else
return ((Sequence< Reference< XInterface > >*)pData)->getLength();
}
- else if( Reference<XInterface>( (XInterface*)pData ) == rListener )
+ else if( pData && Reference<XInterface>( (XInterface*)pData ) == rListener )
{
((XInterface *)pData)->release();
pData = 0;