Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: fpdfsdk/src/fpdfeditimg.cpp

Issue 1407583004: Changes to master to more closely match XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/fpdfeditimg.cpp
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp
index 3b5272cace941ec91133aedfd89ee7b9ac8eff46..bb710789ccdc5c1c8fa391def31581365f93ad77 100644
--- a/fpdfsdk/src/fpdfeditimg.cpp
+++ b/fpdfsdk/src/fpdfeditimg.cpp
@@ -22,7 +22,7 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
FPDF_FILEACCESS* fileAccess) {
- if (!image_object || !fileAccess)
+ if (!image_object || !fileAccess || !pages)
return FALSE;
IFX_FileRead* pFile = new CPDF_CustomAccess(fileAccess);
@@ -61,7 +61,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
FPDF_BITMAP bitmap) {
- if (!image_object || !bitmap)
+ if (!image_object || !bitmap || !pages)
return FALSE;
CFX_DIBitmap* pBmp = NULL;
pBmp = (CFX_DIBitmap*)bitmap;

Powered by Google App Engine
This is Rietveld 408576698