Kaydet (Commit) 9e351edc authored tarafından Michael Stahl's avatar Michael Stahl

winaccessibility: fix exception handling in AccEventListener

RemoveMeFromBroadcaster() may catch a DisposedException and then not
call NotifyDestroy.

Change-Id: I2b766541c3e6800c88a83aa482de0093714d39c2
üst b6664d06
......@@ -233,14 +233,20 @@ void AccEventListener::RemoveMeFromBroadcaster()
{
return;
}
Reference<XAccessibleEventBroadcaster> const xBroadcaster(
m_xAccessible->getAccessibleContext(), UNO_QUERY);
if (xBroadcaster.is())
try
{
//remove the lister from accessible object
xBroadcaster->removeAccessibleEventListener(this);
pAgent->NotifyDestroy(m_xAccessible.get());
Reference<XAccessibleEventBroadcaster> const xBroadcaster(
m_xAccessible->getAccessibleContext(), UNO_QUERY);
if (xBroadcaster.is())
{
//remove the lister from accessible object
xBroadcaster->removeAccessibleEventListener(this);
}
}
catch (Exception const&)
{ // may throw if it's already disposed - ignore that
}
pAgent->NotifyDestroy(m_xAccessible.get());
m_xAccessible.clear(); // release cyclic reference
}
catch(...)
......
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