| Index: fpdfsdk/src/fpdfview.cpp
|
| diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
|
| index 43feaf4d5a9154999eb40c893fbe60ef5b59337a..f73359b838975cd37f089862c2013f5b006b0d79 100644
|
| --- a/fpdfsdk/src/fpdfview.cpp
|
| +++ b/fpdfsdk/src/fpdfview.cpp
|
| @@ -850,7 +850,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index,
|
| if (!pDestObj) return NULL;
|
| if (pDestObj->GetType() == PDFOBJ_DICTIONARY)
|
| pDestObj = ((CPDF_Dictionary*)pDestObj)->GetArray(FX_BSTRC("D"));
|
| - if (pDestObj->GetType() != PDFOBJ_ARRAY) return NULL;
|
| + if (!pDestObj || pDestObj->GetType() != PDFOBJ_ARRAY) return NULL;
|
| CFX_WideString wsName = PDF_DecodeText(bsName);
|
| CFX_ByteString utf16Name = wsName.UTF16LE_Encode();
|
| unsigned int len = utf16Name.GetLength();
|
| @@ -861,7 +861,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index,
|
| ((FX_BYTE*)buffer)[len] = 0;
|
| ((FX_BYTE*)buffer)[len + 1] = 0;
|
| } else {
|
| - len = -1;
|
| + buflen = -1;
|
| }
|
| return (FPDF_DEST)pDestObj;
|
| }
|
|
|