diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-06-30 09:49:21 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-06-30 09:49:21 -0700 |
commit | 287e11a213d3197ac3e321acf294d903b271c269 (patch) | |
tree | 28f6f9dd00331c2748d73f96d818ce04a9775e8d /core/src/fpdfdoc/doc_basic.cpp | |
parent | ad30f609702d232f1708a0792d682c3cfaa0e235 (diff) | |
download | pdfium-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 'core/src/fpdfdoc/doc_basic.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_basic.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp index 199a9a6dec..25f641c52e 100644 --- a/core/src/fpdfdoc/doc_basic.cpp +++ b/core/src/fpdfdoc/doc_basic.cpp @@ -72,7 +72,10 @@ CFX_ByteString CPDF_Dest::GetRemoteName() } CPDF_NameTree::CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category) { - m_pRoot = pDoc->GetRoot()->GetDict(FX_BSTRC("Names"))->GetDict(category); + if (pDoc->GetRoot() && pDoc->GetRoot()->GetDict(FX_BSTRC("Names"))) + m_pRoot = pDoc->GetRoot()->GetDict(FX_BSTRC("Names"))->GetDict(category); + else + m_pRoot = NULL; } static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode, const CFX_ByteString& csName, int& nIndex, CPDF_Array** ppFind, int nLevel = 0) |