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

Unified Diff: core/src/fpdftext/fpdf_text_search.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years 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 | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698