Kaydet (Commit) bce4f8dd authored tarafından David Tardon's avatar David Tardon

coverity#982188 unchecked return value

Change-Id: I8b99afa5d43e1a9f003c3b31175d73bf5a289232
üst 6631ed54
......@@ -1633,7 +1633,19 @@ namespace accessibility
{
if( getNotifierClientId() != -1 )
::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
{
const sal_Int32 nListenerCount = ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
if ( !nListenerCount )
{
// no listeners anymore
// -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
// and at least to us not firing any events anymore, in case somebody calls
// NotifyAccessibleEvent, again
::comphelper::AccessibleEventNotifier::TClientId nId( getNotifierClientId() );
mnNotifierClientId = -1;
::comphelper::AccessibleEventNotifier::revokeClient( nId );
}
}
}
uno::Reference< XAccessible > SAL_CALL AccessibleTextHelper_Impl::getAccessibleAtPoint( const awt::Point& _aPoint )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment