Add NULL check for new page contents code.

This commit is contained in:
Michael R Sweet
2026-01-27 19:23:27 -05:00
parent a6160e7f6f
commit e9ba25c0da

View File

@@ -396,7 +396,8 @@ get_contents(pdfio_obj_t *page) // I - Page object
if (page->value.type != PDFIO_VALTYPE_DICT)
return (NULL);
contents = _pdfioDictGetValue(page->value.value.dict, "Contents");
if ((contents = _pdfioDictGetValue(page->value.value.dict, "Contents")) == NULL)
return (NULL);
if (contents->type == PDFIO_VALTYPE_INDIRECT)
{