summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-08-07 11:36:47 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-08-07 11:41:40 +0200
commita0ff39aef11e6e390f01b395c0f7063f6179b98e (patch)
tree0ed7cc0667ed1e05a910305e98df94e62fa8eabb /sd
parent88d4ca8b6eb77e49c10139f502d559d260e2e97d (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
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/toolpanel/TaskPaneFocusManager.cxx3
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;