Chromium Code Reviews| Index: core/fpdftext/cpdf_textpage.cpp | 
| diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp | 
| index 105694329221539426e00d15e1be6c98e48f9f0c..d88464bfc45278f197a612f56bd7320f10cf840a 100644 | 
| --- a/core/fpdftext/cpdf_textpage.cpp | 
| +++ b/core/fpdftext/cpdf_textpage.cpp | 
| @@ -818,11 +818,10 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) { | 
| int n = 0; | 
| for (n = 0; n < nContentMark; n++) { | 
| const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(n); | 
| - if (item.GetParamType() == CPDF_ContentMarkItem::ParamType::None) | 
| - continue; | 
| pDict = item.GetParam(); | 
| - CPDF_String* temp = | 
| - ToString(pDict ? pDict->GetObjectFor("ActualText") : nullptr); | 
| + if (!pDict) | 
| + continue; | 
| + CPDF_String* temp = ToString(pDict->GetObjectFor("ActualText")); | 
| 
 
dsinclair
2016/09/21 19:34:43
Can't this still, possibly be null, if we called S
 
Tom Sepez
2016/09/21 20:04:44
Either way, pDict is assigned to nullptr, and we c
 
 | 
| if (temp) { | 
| bExist = true; | 
| actText = temp->GetUnicodeText(); | 
| @@ -877,12 +876,9 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) { | 
| return; | 
| CFX_WideString actText; | 
| - CPDF_Dictionary* pDict = nullptr; | 
| for (int n = 0; n < nContentMark; n++) { | 
| const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(n); | 
| - if (item.GetParamType() == CPDF_ContentMarkItem::ParamType::None) | 
| - continue; | 
| - pDict = item.GetParam(); | 
| + CPDF_Dictionary* pDict = item.GetParam(); | 
| if (pDict) | 
| actText = pDict->GetUnicodeTextFor("ActualText"); | 
| } |