summaryrefslogtreecommitdiffstats
path: root/sdext
diff options
context:
space:
mode:
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);
+ }
}
}