aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_optimization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDF_optimization.cc')
-rw-r--r--libqpdf/QPDF_optimization.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libqpdf/QPDF_optimization.cc b/libqpdf/QPDF_optimization.cc
index 1e42865c..59a01ea3 100644
--- a/libqpdf/QPDF_optimization.cc
+++ b/libqpdf/QPDF_optimization.cc
@@ -163,7 +163,12 @@ QPDF::pushInheritedAttributesToPage(bool allow_changes, bool warn_skipped_keys)
pushInheritedAttributesToPageInternal(
this->m->trailer.getKey("/Root").getKey("/Pages"),
key_ancestors, this->m->all_pages, allow_changes, warn_skipped_keys);
- assert(key_ancestors.empty());
+ if (! key_ancestors.empty())
+ {
+ throw std::logic_error(
+ "key_ancestors not empty after"
+ " pushing inherited attributes to pages");
+ }
this->m->pushed_inherited_attributes_to_pages = true;
}