Index: experimental/PdfViewer/SkPdfRenderer.cpp |
=================================================================== |
--- experimental/PdfViewer/SkPdfRenderer.cpp (revision 10286) |
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy) |
@@ -1949,6 +1949,10 @@ |
PdfContext pdfContext(fPdfDoc); |
SkPdfNativeTokenizer* tokenizer = fPdfDoc->tokenizerOfPage(page, pdfContext.fTmpPageAllocator); |
+ if (!tokenizer) { |
+ // TODO(edisonn): report/warning/debug |
+ return false; |
+ } |
pdfContext.fOriginalMatrix = SkMatrix::I(); |
pdfContext.fGraphicsState.fResources = fPdfDoc->pageResources(page); |