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

coverity#982160 unchecked return value

Change-Id: I94117e9f53f1929906b88b2a31d0fcfdf2e40c8d
üst c982e6f5
......@@ -1025,7 +1025,19 @@ namespace accessibility
void SAL_CALL AccessibleEditableTextPara::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException, std::exception)
{
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 );
}
}
}
// XAccessibleComponent
......
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