diff options
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/implbase.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index 147fe822c091..32526450b8b8 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -284,7 +284,10 @@ void WeakAggComponentImplHelperBase::removeEventListener( Reference< lang::XEventListener > const & xListener ) throw (RuntimeException, std::exception) { - rBHelper.removeListener( cppu::UnoType<decltype(xListener)>::get(), xListener ); + // if we have disposed, then we have cleared the list already + MutexGuard aGuard( rBHelper.rMutex ); + if (!rBHelper.bDisposed) + rBHelper.removeListener( cppu::UnoType<decltype(xListener)>::get(), xListener ); } } |