vcl/source/fontsubset/ttcr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 13b0c30f1b37c044a17e26cb5e64c2e9e9367773 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Sep 23 09:24:36 2022 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Sep 23 10:12:44 2022 +0200 cid#1515534 invalidate_iterator Change-Id: Ib7763b2a7df858ad8749eca35d3e7518a39fad75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140470 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index 6e6620a5edb2..5bfc283e48a6 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -137,12 +137,14 @@ void TrueTypeCreator::AddTable(std::unique_ptr<TrueTypeTable> table) void TrueTypeCreator::RemoveTable(sal_uInt32 tableTag) { - for (auto it = this->m_tables.begin(); it != this->m_tables.end(); ++it) + for (auto it = this->m_tables.begin(); it != this->m_tables.end(); ) { if ((*it)->m_tag == tableTag) { - this->m_tables.erase(it); + it = this->m_tables.erase(it); } + else + ++it; } }