summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-11-22 22:49:15 +0100
committerMichael Stahl <mstahl@redhat.com>2016-11-23 11:11:09 +0100
commitf6d2ff1cb7f0f4917a0d4df38d5dcff8e37d20cc (patch)
tree1a24d9135c05ac1426af7a74805e1ad07a214e86 /sdext
parente77c931f44c91c40fd67863fd6c3c6c4167ad3ff (diff)
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
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 7c474b288daf..48916ebf025a 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);
+ }
}
}