Avoid potential segfault in warning methods

This commit is contained in:
Jay Berkenbilt 2020-04-03 17:14:11 -04:00
parent 4f3b89991b
commit 6a4117add9
1 changed files with 2 additions and 0 deletions

View File

@ -2652,6 +2652,7 @@ QPDFObjectHandle::typeWarning(char const* expected_type,
{
QPDF* context = 0;
std::string description;
dereference();
if (this->obj->getDescription(context, description))
{
warn(context,
@ -2674,6 +2675,7 @@ QPDFObjectHandle::warnIfPossible(std::string const& warning,
{
QPDF* context = 0;
std::string description;
dereference();
if (this->obj->getDescription(context, description))
{
warn(context,