presenter console: fix STL assert when exiting slide show
AtkListener::handleChildRemoved() calls removeAccessibleEventListener(),
apparently without the listener being registered, so the remove() returns
end(), which isn't valid for erase().
(probably happens since e4e208fa2b
)
Change-Id: Ia0de1bafe214f5a46f250d6573d8c4b408c9cf26
This commit is contained in:
@@ -1109,7 +1109,11 @@ void SAL_CALL PresenterAccessible::AccessibleObject::removeAccessibleEventListen
|
||||
{
|
||||
const osl::MutexGuard aGuard(m_aMutex);
|
||||
|
||||
maListeners.erase(std::remove(maListeners.begin(), maListeners.end(), rxListener));
|
||||
auto const it(std::remove(maListeners.begin(), maListeners.end(), rxListener));
|
||||
if (it != maListeners.end())
|
||||
{
|
||||
maListeners.erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user