| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
|
| index 36cc9db754dd2cce7d8f310e54d6ddae3f68e00e..dd4eeddc171da33e032a853c6db1568d6f6fd5af 100644
|
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
|
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
|
| @@ -111,7 +111,8 @@ FX_BOOL CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const
|
| }
|
| CFX_WideString CFDF_Document::GetWin32Path() const
|
| {
|
| - CPDF_Object* pFileSpec = m_pRootDict->GetDict(FX_BSTRC("FDF"))->GetElementValue(FX_BSTRC("F"));
|
| + CPDF_Dictionary* pDict = m_pRootDict ? m_pRootDict->GetDict(FX_BSTRC("FDF")) : NULL;
|
| + CPDF_Object* pFileSpec = pDict ? pDict->GetElementValue(FX_BSTRC("F")) : NULL;
|
| if (pFileSpec == NULL) {
|
| return CFX_WideString();
|
| }
|
| @@ -203,7 +204,10 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec)
|
| if (wsFileName.IsEmpty() && pDict->KeyExist(FX_BSTRC("DOS"))) {
|
| wsFileName = CFX_WideString::FromLocal(pDict->GetString(FX_BSTRC("DOS")));
|
| }
|
| - } else {
|
| + }
|
| + else if (!pFileSpec)
|
| + wsFileName = CFX_WideString();
|
| + else {
|
| wsFileName = CFX_WideString::FromLocal(pFileSpec->GetString());
|
| }
|
| if (wsFileName[0] != '/') {
|
|
|