summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-03 17:15:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-08 06:40:25 +0000
commit80c874dc87ad3018df6e6f0edb7cca174f75db37 (patch)
treefa119fc641f9708332a0d931533684bab07c9e87 /cppuhelper
parent7fb70ff650ce3a1e4a39bd1b936f511d6be8986c (diff)
remove "object is disposed" warning in OBroadcastHelperVar::removeListener
doesn't add anything of value. Change-Id: Ie2dea7c43570640284771c992d0072ab61de425e Reviewed-on: https://gerrit.libreoffice.org/25871 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/implbase.cxx5
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 );
}
}