summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_pages.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDF_pages.cc')
-rw-r--r--libqpdf/QPDF_pages.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc
index 0604cd40..b88ed5fa 100644
--- a/libqpdf/QPDF_pages.cc
+++ b/libqpdf/QPDF_pages.cc
@@ -120,7 +120,10 @@ QPDF::flattenPagesTree()
pages.replaceKey("/Kids", QPDFObjectHandle::newArray(this->all_pages));
// /Count has not changed
- assert(pages.getKey("/Count").getIntValue() == len);
+ if (pages.getKey("/Count").getIntValue() != len)
+ {
+ throw std::logic_error("/Count is wrong after flattening pages tree");
+ }
}
void