mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Check for reserved after dereference
This commit is contained in:
parent
c9c711a351
commit
552303a94a
@ -1754,12 +1754,12 @@ QPDFObjectHandle::unparse()
|
||||
std::string
|
||||
QPDFObjectHandle::unparseResolved()
|
||||
{
|
||||
dereference();
|
||||
if (this->reserved)
|
||||
{
|
||||
throw std::logic_error(
|
||||
"QPDFObjectHandle: attempting to unparse a reserved object");
|
||||
}
|
||||
dereference();
|
||||
return this->obj->unparse();
|
||||
}
|
||||
|
||||
@ -1786,12 +1786,12 @@ QPDFObjectHandle::getJSON(bool dereference_indirect)
|
||||
}
|
||||
else
|
||||
{
|
||||
dereference();
|
||||
if (this->reserved)
|
||||
{
|
||||
throw std::logic_error(
|
||||
"QPDFObjectHandle: attempting to unparse a reserved object");
|
||||
}
|
||||
dereference();
|
||||
return this->obj->getJSON();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user