diff options
author | Jay Berkenbilt <ejb@ql.org> | 2014-11-14 19:43:34 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2014-11-14 19:43:34 +0100 |
commit | caab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c (patch) | |
tree | 289badc34732a92059a939935a67f37fbbb8b8b2 /libqpdf/QPDFObjectHandle.cc | |
parent | 4071db59aa475b42ba4db71462ab4f83b4bd2132 (diff) | |
download | qpdf-caab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c.tar.zst |
Handle pages with no /Contents from getPageContents()
The spec allows /Contents to be omitted for pages that are blank, but
QPDFObjectHandle::getPageContents() was throwing an exception in this
case.
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index ef92e3ac..eec4fae3 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -633,7 +633,7 @@ QPDFObjectHandle::getPageContents() { result.push_back(contents); } - else + else if (! contents.isNull()) { throw std::runtime_error("unknown object type inspecting /Contents " "key in page dictionary"); |