Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3146)

Unified Diff: core/src/fpdfdoc/doc_formcontrol.cpp

Issue 1587723004: Merge to XFA: Fix another invalidated iterator issue while traversing CPDF_Dictionary. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_formcontrol.cpp
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp
index 6c3d1ec9c4e392281224c06858930ee677ecda00..bf37d85195088f27bed75e24767a607954d2dc5d 100644
--- a/core/src/fpdfdoc/doc_formcontrol.cpp
+++ b/core/src/fpdfdoc/doc_formcontrol.cpp
@@ -64,9 +64,11 @@ void CPDF_FormControl::SetOnStateName(const CFX_ByteString& csOn) {
if (!pSubDict)
continue;
- for (const auto& subdict_it : *pSubDict) {
- const CFX_ByteString& csKey2 = subdict_it.first;
- CPDF_Object* pObj2 = subdict_it.second;
+ auto subdict_it = pSubDict->begin();
+ while (subdict_it != pSubDict->end()) {
+ const CFX_ByteString& csKey2 = subdict_it->first;
+ CPDF_Object* pObj2 = subdict_it->second;
+ ++subdict_it;
if (!pObj2) {
continue;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698