summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_pages.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-03-06 17:25:09 +0100
committerJay Berkenbilt <ejb@ql.org>2018-03-06 17:34:07 +0100
commite4e2e26d990d038b0d35e7466c8a24dbfafab7d2 (patch)
tree3f9341102bdadb710912b700e26b8be6e2288123 /libqpdf/QPDF_pages.cc
parent1a4dcb4aaf987631caa93a9d3a5b42ca439bb6ae (diff)
downloadqpdf-e4e2e26d990d038b0d35e7466c8a24dbfafab7d2.tar.zst
Properly handle pages with no contents (fixes #194)
Remove calls to assertPageObject(). All cases in the library that called assertPageObject() work fine if you don't call assertPageObject() because nothing assumes anything that was being checked by that call. Removing the calls enables more files to be successfully processed.
Diffstat (limited to 'libqpdf/QPDF_pages.cc')
-rw-r--r--libqpdf/QPDF_pages.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc
index 31307e4e..ea5afdb5 100644
--- a/libqpdf/QPDF_pages.cc
+++ b/libqpdf/QPDF_pages.cc
@@ -191,7 +191,6 @@ QPDF::insertPage(QPDFObjectHandle newpage, int pos)
// pos = npages adds to the end.
flattenPagesTree();
- newpage.assertPageObject();
if (! newpage.isIndirect())
{
@@ -288,7 +287,6 @@ QPDF::addPage(QPDFObjectHandle newpage, bool first)
int
QPDF::findPage(QPDFObjectHandle& page)
{
- page.assertPageObject();
return findPage(page.getObjGen());
}