diff options
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_flatten.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp index 76ffec3e26..2a0c2d947c 100644 --- a/fpdfsdk/src/fpdf_flatten.cpp +++ b/fpdfsdk/src/fpdf_flatten.cpp @@ -440,10 +440,9 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) { if (!sAnnotState.IsEmpty()) { pAPStream = pAPDic->GetStream(sAnnotState); } else { - FX_POSITION pos = pAPDic->GetStartPos(); - if (pos) { - CFX_ByteString sKey; - CPDF_Object* pFirstObj = pAPDic->GetNextElement(pos, sKey); + auto it = pAPDic->begin(); + if (it != pAPDic->end()) { + CPDF_Object* pFirstObj = it->second; if (pFirstObj) { if (pFirstObj->IsReference()) pFirstObj = pFirstObj->GetDirect(); |