https://bugs.freedesktop.org/show_bug.cgi?id=51324
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #7 from Julien Nabet <[email protected]> 2012-06-22 11:34:54 PDT --- I'm not sure but : "erase" invalidates the iterator in the for loop. Then it breaks so we exit the inner/for loop but we keep on the outer/do loop (since bLinkRemoved =true), then iLink iterator var is recreated and reinitialized with begin. In brief, yep "erase" invalidates, but then iLink is valid again. Now perhaps I miss something obvious. 234 do 235 { 236 bLinkRemoved = false; 237 LinkMap::iterator iLink; 238 for (iLink=mpLinks->begin(); iLink!=mpLinks->end(); ++iLink) 239 { 240 if (iLink->second.mpTargetWindow == pWindow) 241 { 242 RemoveUnusedEventListener(iLink->first); 243 mpLinks->erase(iLink); 244 bLinkRemoved = true; 245 break; 246 } 247 } 248 } 249 while (bLinkRemoved); -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
