aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2014-11-14 19:43:34 +0100
committerJay Berkenbilt <ejb@ql.org>2014-11-14 19:43:34 +0100
commitcaab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c (patch)
tree289badc34732a92059a939935a67f37fbbb8b8b2 /libqpdf
parent4071db59aa475b42ba4db71462ab4f83b4bd2132 (diff)
downloadqpdf-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')
-rw-r--r--libqpdf/QPDFObjectHandle.cc2
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");