summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index bd7741d1e8..b3c8137d0c 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -1041,14 +1041,15 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document,
pDestObj = nameTree.LookupValue(index, bsName);
}
if (!pDestObj)
- return NULL;
+ return nullptr;
if (CPDF_Dictionary* pDict = pDestObj->AsDictionary()) {
pDestObj = pDict->GetArray(FX_BSTRC("D"));
if (!pDestObj)
- return NULL;
+ return nullptr;
}
- if (pDestObj->GetType() != PDFOBJ_ARRAY)
- return NULL;
+ if (!pDestObj->IsArray())
+ return nullptr;
+
CFX_WideString wsName = PDF_DecodeText(bsName);
CFX_ByteString utf16Name = wsName.UTF16LE_Encode();
unsigned int len = utf16Name.GetLength();