[Libreoffice-commits] core.git: sdext/source
Michael Stahl
mstahl at redhat.com
Wed Nov 23 10:14:34 UTC 2016
sdext/source/presenter/PresenterAccessibility.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit f6d2ff1cb7f0f4917a0d4df38d5dcff8e37d20cc
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Nov 22 22:49:15 2016 +0100
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 e4e208fa2b0930be5a7cbbe2fab2ff2fe2c4a1ff)
Change-Id: Ia0de1bafe214f5a46f250d6573d8c4b408c9cf26
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 7c474b2..48916ebf0 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -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);
+ }
}
}
More information about the Libreoffice-commits
mailing list