[Libreoffice] [PATCH] proposed fix for fdo#44040 (seems iterator issue only)

Caolán McNamara caolanm at redhat.com
Mon Jan 16 09:12:11 PST 2012


On Sat, 2012-01-14 at 11:17 -0800, julien2412 wrote:
> Hello,
> 
> I propose the attached patch for fdo#44040 (see
> https://bugs.freedesktop.org/attachment.cgi?id=55580)
> Since I could have missed something, I would like your opinion about this.

Does this work ? I worry (maybe I'm out of date on this one?) that
std::map::erase only returns an iterator in C++11x not C++98 which we
still support.

Assuming this works it avoids the two problems I see of
a) trying to move aPrevious to before the first valid iterator if aLoop
points to the first entry
b) deferencing aLoop after its been deleted in aLoop->first
which retaining the apparent rest of the logic

C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: does.this.work.patch
Type: text/x-patch
Size: 1682 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120116/872e0405/attachment-0001.bin>


More information about the LibreOffice mailing list