Avoid exception when trying to render some glyphs contours

It fixes #20513.
This commit is contained in:
calixteman 2025-12-21 21:34:42 +01:00
parent 509fcc84e2
commit fc4985819f
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F
4 changed files with 9 additions and 1 deletions

View File

@ -436,7 +436,7 @@ class FontFaceObject {
} catch (ex) {
warn(`getPathGenerator - ignoring character: "${ex}".`);
}
const path = makePathFromDrawOPS(cmds.path);
const path = makePathFromDrawOPS(cmds?.path);
if (!this.fontExtraProperties) {
// Remove the raw path-string, since we don't need it anymore.

View File

@ -765,4 +765,5 @@
!two_paragraphs.pdf
!paragraph_and_link.pdf
!issue20225.pdf
!issue20513.pdf
!issue20516.pdf

BIN
test/pdfs/issue20513.pdf Normal file

Binary file not shown.

View File

@ -13099,5 +13099,12 @@
"enableXfa": true,
"lastPage": 1,
"type": "eq"
},
{
"id": "issue20513",
"file": "pdfs/issue20513.pdf",
"md5": "19a3a347773518242fa3cf1c04a9a1e4",
"rounds": 1,
"type": "eq"
}
]