| author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-08-07 09:36:47 (GMT) |
|---|---|---|
| committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-08-07 09:41:40 (GMT) |
| commit | a0ff39aef11e6e390f01b395c0f7063f6179b98e (patch) (side-by-side diff) | |
| tree | 0ed7cc0667ed1e05a910305e98df94e62fa8eabb | |
| parent | 88d4ca8b6eb77e49c10139f502d559d260e2e97d (diff) | |
| download | core-a0ff39aef11e6e390f01b395c0f7063f6179b98e.zip core-a0ff39aef11e6e390f01b395c0f7063f6179b98e.tar.gz | |
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
| -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 6be7076..4f9698a 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; |
