| Index: core/src/fpdfdoc/doc_basic.cpp
|
| diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
|
| index b32e34bb4c2a956800fc7db1f7ee7e68033058f4..414f5749d0b8952f1eae9bc7ebb0e9f5f4c6589f 100644
|
| --- a/core/src/fpdfdoc/doc_basic.cpp
|
| +++ b/core/src/fpdfdoc/doc_basic.cpp
|
| @@ -380,15 +380,13 @@ CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath) {
|
| #endif
|
| }
|
| CPDF_Stream* CPDF_FileSpec::GetFileStream() const {
|
| - if (m_pObj == NULL) {
|
| - return NULL;
|
| - }
|
| - int32_t iType = m_pObj->GetType();
|
| - if (iType == PDFOBJ_STREAM)
|
| - return (CPDF_Stream*)m_pObj;
|
| + if (!m_pObj)
|
| + return nullptr;
|
| + if (CPDF_Stream* pStream = m_pObj->AsStream())
|
| + return pStream;
|
| if (CPDF_Dictionary* pEF = m_pObj->AsDictionary()->GetDict(FX_BSTRC("EF")))
|
| return pEF->GetStream(FX_BSTRC("F"));
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object* pObj,
|
| const CFX_WideStringC& wsFileName,
|
|
|