Index: core/src/fpdftext/fpdf_text_search.cpp |
diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp |
index 43486c7ab8accf6f819cc25deb13e2ee8f0aa04b..80bf5ec99ad0052f7676b6eca77098834fd9ca0a 100644 |
--- a/core/src/fpdftext/fpdf_text_search.cpp |
+++ b/core/src/fpdftext/fpdf_text_search.cpp |
@@ -303,13 +303,8 @@ void GetTextStream_Unicode(CFX_WideTextBuf& buffer, |
FX_POSITION pos = pPage->GetFirstObjectPosition(); |
while (pos) { |
CPDF_PageObject* pObject = pPage->GetNextObject(pos); |
- if (pObject == NULL) { |
- continue; |
- } |
- if (pObject->m_Type != PDFPAGE_TEXT) { |
- continue; |
- } |
- textstream.ProcessObject((CPDF_TextObject*)pObject, FALSE); |
+ if (pObject && pObject->m_Type == PDFPAGE_TEXT) |
+ textstream.ProcessObject((CPDF_TextObject*)pObject, FALSE); |
} |
} |
CFX_WideString PDF_GetFirstTextLine_Unicode(CPDF_Document* pDoc, |