diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/accessibleruler.cxx | 23 |
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(); } } |