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

Unified Diff: experimental/PdfViewer/SkPdfFont.cpp

Issue 20004007: pdfviewer: don't crash if the xref is corrupted. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfFont.cpp
===================================================================
--- experimental/PdfViewer/SkPdfFont.cpp (revision 10286)
+++ experimental/PdfViewer/SkPdfFont.cpp (working copy)
@@ -197,7 +197,7 @@
// TODO(edisonn): perf - make a map
for (unsigned int i = 0 ; i < doc->objects(); i++) {
SkPdfObject* obj = doc->object(i);
- if (!obj->isDictionary()) {
+ if (!obj || !obj->isDictionary()) {
continue;
}
« no previous file with comments | « no previous file | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698