mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
Avoid potential segfault in warning methods
This commit is contained in:
parent
4f3b89991b
commit
6a4117add9
@ -2652,6 +2652,7 @@ QPDFObjectHandle::typeWarning(char const* expected_type,
|
|||||||
{
|
{
|
||||||
QPDF* context = 0;
|
QPDF* context = 0;
|
||||||
std::string description;
|
std::string description;
|
||||||
|
dereference();
|
||||||
if (this->obj->getDescription(context, description))
|
if (this->obj->getDescription(context, description))
|
||||||
{
|
{
|
||||||
warn(context,
|
warn(context,
|
||||||
@ -2674,6 +2675,7 @@ QPDFObjectHandle::warnIfPossible(std::string const& warning,
|
|||||||
{
|
{
|
||||||
QPDF* context = 0;
|
QPDF* context = 0;
|
||||||
std::string description;
|
std::string description;
|
||||||
|
dereference();
|
||||||
if (this->obj->getDescription(context, description))
|
if (this->obj->getDescription(context, description))
|
||||||
{
|
{
|
||||||
warn(context,
|
warn(context,
|
||||||
|
Loading…
Reference in New Issue
Block a user