summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 15:14:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 17:27:05 +0000
commit8228227168a7eb3ebf14629bec87f01536c23970 (patch)
tree8f3dc4787057b4fc7706fd81892dd47ada79c608 /svtools
parente794ce1eef6730e5a46d5fb0aa6db2895ede85e7 (diff)
convert OSL_ENSURE to assert in AccessibleEventNotifier
and fix the places that trigger it Change-Id: I97a04cff25ab5aa1d42c79a971d15ba742bf384e Reviewed-on: https://gerrit.libreoffice.org/31760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/accessibleruler.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index bd71793865f4..f528ca65a505 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -260,7 +260,7 @@ void SAL_CALL SvtRulerAccessible::addAccessibleEventListener( const uno::Referen
void SAL_CALL SvtRulerAccessible::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
throw( RuntimeException, std::exception )
{
- if (xListener.is())
+ if (xListener.is() && mnClientId)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -332,23 +332,16 @@ void SAL_CALL SvtRulerAccessible::disposing()
{
if( !rBHelper.bDisposed )
{
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- mpRepr = nullptr; // object dies with representation
-
- }
+ ::osl::MutexGuard aGuard( m_aMutex );
+ mpRepr = nullptr; // object dies with representation
+ // Send a disposing to all listeners.
+ if ( mnClientId )
{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- // Send a disposing to all listeners.
- if ( mnClientId )
- {
- comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
- mnClientId = 0;
- }
- mxParent.clear();
+ comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
+ mnClientId = 0;
}
+ mxParent.clear();
}
}