summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_ext.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
commit287e11a213d3197ac3e321acf294d903b271c269 (patch)
tree28f6f9dd00331c2748d73f96d818ce04a9775e8d /fpdfsdk/src/fpdf_ext.cpp
parentad30f609702d232f1708a0792d682c3cfaa0e235 (diff)
downloadpdfium-287e11a213d3197ac3e321acf294d903b271c269.tar.xz
Remove "this==NULL" and adjust corresponding callers
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
Diffstat (limited to 'fpdfsdk/src/fpdf_ext.cpp')
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 916cb2069c..93f6e187da 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++)