summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2014-10-19 22:47:15 +1030
committerAdrian Johnson <ajohnson@redneon.com>2014-10-21 20:14:12 +1030
commit88dbd4df0998233939b4a51cedbfc65c58a315f9 (patch)
treebdef2b0911ddb6776b032b8be8093e9ee6b212ec /utils
parente0179304cdef615fcf639046410d214fd5b5f276 (diff)
pdfdetach: fix crash when getPage() returns null
Bug 85145
Diffstat (limited to 'utils')
-rw-r--r--utils/pdfdetach.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
index 4f67fd70..3bae3c03 100644
--- a/utils/pdfdetach.cc
+++ b/utils/pdfdetach.cc
@@ -163,6 +163,8 @@ int main(int argc, char *argv[]) {
nPages = doc->getCatalog()->getNumPages();
for (i = 0; i < nPages; ++i) {
page = doc->getCatalog()->getPage(i + 1);
+ if (!page)
+ continue;
annots = page->getAnnots();
if (!annots)
break;