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

Unified Diff: fpdfsdk/src/fpdf_ext.cpp

Issue 361553002: Remove "this==NULL" and adjust corresponding callers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix if check warning Created 6 years, 6 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 | « fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_ext.cpp
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 916cb2069cdd11bdbe5c5d9de8e59668bec1e9cc..93f6e187da60295dfd7137160b0a962dbde1befa 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -172,15 +172,15 @@ void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code)
if(pRootDict->KeyExist("Names"))
{
CPDF_Dictionary* pNameDict = pRootDict->GetDict("Names");
- if(pNameDict->KeyExist("EmbeddedFiles"))
+ if (pNameDict && pNameDict->KeyExist("EmbeddedFiles"))
{
FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT);
return;
}
- else if(pNameDict->KeyExist("JavaScript"))
+ else if (pNameDict && pNameDict->KeyExist("JavaScript"))
{
CPDF_Dictionary* pJSDict = pNameDict->GetDict("JavaScript");
- CPDF_Array * pArray = pJSDict->GetArray("Names");
+ CPDF_Array * pArray = pJSDict ? pJSDict->GetArray("Names") : NULL;
if (pArray) {
int nCount = pArray->GetCount();
for(int i=0; i<nCount; i++)
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698