[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sd/source

Michael Meeks michael at kemper.freedesktop.org
Wed Aug 8 06:51:05 PDT 2012


 sd/source/ui/toolpanel/TaskPaneFocusManager.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 861e55bd889d9f5f5b37724b3615e9355e2d5c15
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Tue Aug 7 11:36:47 2012 +0200

    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 at suse.com>

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;


More information about the Libreoffice-commits mailing list