diff options
Diffstat (limited to 'WebKit/mac/WebView/WebPDFDocumentExtras.mm')
| -rw-r--r-- | WebKit/mac/WebView/WebPDFDocumentExtras.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.mm b/WebKit/mac/WebView/WebPDFDocumentExtras.mm index b7043df..7651dba 100644 --- a/WebKit/mac/WebView/WebPDFDocumentExtras.mm +++ b/WebKit/mac/WebView/WebPDFDocumentExtras.mm @@ -112,6 +112,8 @@ NSArray *allScriptsInPDFDocument(PDFDocument *document) if (CGPDFDictionaryGetStream(javaScriptAction, "JS", &stream)) { CGPDFDataFormat format; data.adoptCF(CGPDFStreamCopyData(stream, &format)); + if (!data) + continue; bytes = CFDataGetBytePtr(data.get()); length = CFDataGetLength(data.get()); } else if (CGPDFDictionaryGetString(javaScriptAction, "JS", &string)) { |
