Chromium Code Reviews| Index: fpdfsdk/src/fpdfsave.cpp |
| diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp |
| index e4baa47ba45df6dd0108bca2c4d39c42f95ca893..0573e17ba8d6c7decd7023578ea562229fdb86d3 100644 |
| --- a/fpdfsdk/src/fpdfsave.cpp |
| +++ b/fpdfsdk/src/fpdfsave.cpp |
| @@ -57,21 +57,22 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document, |
| FPDF_DWORD flags, |
| FPDF_BOOL bSetVersion, |
| int fileVerion) { |
| - CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); |
| - if (!pDoc) |
| + CPDF_Document* pPDFDoc = CPDFDocumentFromFPDFDocument(document); |
|
Lei Zhang
2015/11/25 22:34:42
UnderlyingDocumentType?
Tom Sepez
2015/11/25 22:50:24
No, because CPDF_Creator::CPDF_Creator() takes a C
|
| + if (!pPDFDoc) |
| return 0; |
| if (flags < FPDF_INCREMENTAL || flags > FPDF_REMOVE_SECURITY) { |
| flags = 0; |
| } |
| - CPDF_Creator FileMaker(pDoc); |
| + CPDF_Creator FileMaker(pPDFDoc); |
| if (bSetVersion) |
| FileMaker.SetFileVersion(fileVerion); |
| if (flags == FPDF_REMOVE_SECURITY) { |
| flags = 0; |
| FileMaker.RemoveSecurity(); |
| } |
| + |
| CFX_IFileWrite* pStreamWrite = NULL; |
| FX_BOOL bRet; |
| pStreamWrite = new CFX_IFileWrite; |