From bc6cd83a673452681f0aeb565ebd2ddbd37ebfb2 Mon Sep 17 00:00:00 2001 From: Jörg Budischewski Date: Thu, 17 May 2001 11:56:41 +0000 Subject: #87171# Calling OInterfaceContainerHelper::removeInterface with an empty reference does not crash anymore(it's still asserted) --- cppuhelper/source/interfacecontainer.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cppuhelper/source/interfacecontainer.cxx') 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 & sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference & 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 >*)pData)->getLength(); } - else if( Reference( (XInterface*)pData ) == rListener ) + else if( pData && Reference( (XInterface*)pData ) == rListener ) { ((XInterface *)pData)->release(); pData = 0; -- cgit