summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-07 21:22:08 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-08 21:34:57 +0200
commit09d544d0c025ebbc9b0cbd77043ce4e8b4ab6be3 (patch)
treec454f0f2b38a4dfc60f1e1b67c564bb1ec7d9cc7 /sc
parent849d879ac1805198b4714c1c5b2a75780ab86479 (diff)
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 <serval2412@yahoo.fr>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
1 files changed, 3 insertions, 1 deletions
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;
}
}