Index: experimental/PdfViewer/generate_code.py |
=================================================================== |
--- experimental/PdfViewer/generate_code.py (revision 10427) |
+++ experimental/PdfViewer/generate_code.py (working copy) |
@@ -482,7 +482,7 @@ |
fileMapperNative.write(' SkPdfObjectType map' + name + '(const SkPdfObject* in) const;\n') |
fileMapperNativeCpp.write('SkPdfObjectType SkPdfMapper::map' + name + '(const SkPdfObject* in) const {\n') |
- fileMapperNativeCpp.write(' if (!is' + name + '(in)) return kNone_SkPdfObjectType;\n') |
+ fileMapperNativeCpp.write(' if (in == NULL || !is' + name + '(in)) return kNone_SkPdfObjectType;\n') |
fileMapperNativeCpp.write('\n') |
if len(cls.fEnumSubclasses) > 0: |
fileMapperNativeCpp.write(' SkPdfObjectType ret;\n') |