sc/source/ui/docshell/externalrefmgr.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 09d544d0c025ebbc9b0cbd77043ce4e8b4ab6be3 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Thu Oct 7 21:22:08 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Oct 8 21:34:57 2021 +0200 Fix iteration in sc/source/ui/docshell/externalrefmgr.cxx Like this since 2012 with: https://cgit.freedesktop.org/libreoffice/core/commit/?id=63ade823e2d854b60df76790e3628a5ab78f653a commit 63ade823e2d854b60df76790e3628a5ab78f653a (patch) tree 69283e660118fb534f50ea1be7ba17b24c7b1c20 parent 51caf9b45403b92deadf934347f2d6f9ffecdf08 (diff) remove entry from unsaved ref container if doc is saved Change-Id: I4845c2c6b9ffd7b9f6b14276e1ca97817d584913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123233 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index f1e010eba4bc..6b905cffa4b8 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -3190,8 +3190,10 @@ void ScExternalRefManager::transformUnsavedRefToSavedRef( SfxObjectShell* pShell OUString aFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri); switchSrcFile(itr->first, aFileURL, OUString()); EndListening(*pShell); - maUnsavedDocShells.erase(itr++); + itr = maUnsavedDocShells.erase(itr); } + else + ++itr; } }