svl/source/inc/poolio.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 0725e8a5d9add88b1289f5b1cb90b0b43059a734 Author: Noel Grandin <[email protected]> AuthorDate: Mon May 13 11:07:28 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon May 13 15:18:22 2019 +0200 tdf#125215 Assertion when closing Database/Advanced Settings This showed up as a segfault for me. Sometimes we have sortable items, for which we store duplicates (because those items are not poolable), in which case comparing by operator== means that we sometimes end up deleting the wrong one. Change-Id: Ic7dff0357d3c5a7a74bf0b4e87fa02f2f5857f30 Reviewed-on: https://gerrit.libreoffice.org/72222 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 2939d50aaf2f..971fb86c9b1d 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -133,7 +133,8 @@ public: assert(false && "did not find item?"); break; } - if (**sortIt == *pNeedle) + // need to compare by pointer here, since we might have duplicates + if (*sortIt == pNeedle) { maSortablePoolItems.erase(sortIt); break; @@ -141,7 +142,7 @@ public: ++sortIt; } } - return maPoolItemSet.erase(it); + maPoolItemSet.erase(it); } }; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
