Don't set extension pointer if object is NULL.

This commit is contained in:
Michael R Sweet 2025-04-25 12:41:11 -04:00
parent 31a086e165
commit afa6d4c4de
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244

View File

@ -1945,7 +1945,8 @@ pdfioFileCreateFontObjFromFile(
if (fd >= 0)
close(fd);
_pdfioObjSetExtension(obj, font, (_pdfio_extfree_t)ttfDelete);
if (obj)
_pdfioObjSetExtension(obj, font, (_pdfio_extfree_t)ttfDelete);
return (obj);
}