diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-08-07 11:36:47 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-08 14:51:20 +0100 |
commit | 861e55bd889d9f5f5b37724b3615e9355e2d5c15 (patch) | |
tree | 09699682a53754b262661ebfd40fb1573ebe2388 | |
parent | e3ba44a70abe6541a57ea55f9abdbc32182724d2 (diff) |
fdo#51324 lp#1017125 rhbz#806236 rhbz#823272: erase on invalid iterators
* the iterators returned by equal_range are invalidated by modification
(which deleting them clearly is)
* possibly only a partial fix as there is more abuse of equal_range in that
file
Change-Id: Ie9ba01e91cb449a32d77a69590bda2125f0924e1
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r-- | sd/source/ui/toolpanel/TaskPaneFocusManager.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx index 6be7076829a7..4f9698a5bffc 100644 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx @@ -226,8 +226,7 @@ void FocusManager::RemoveLinks (::Window* pWindow) pWindow->RemoveEventListener (LINK (this, FocusManager, WindowEventListener)); // Remove the links from the given window. - ::std::pair<LinkMap::iterator,LinkMap::iterator> aCandidates(mpLinks->equal_range(pWindow)); - mpLinks->erase(aCandidates.first, aCandidates.second); + mpLinks->erase(pWindow); // Remove links to the given window. bool bLinkRemoved; |