1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Fix crash when there’s no outline

This commit is contained in:
Guillaume Ayoub 2020-04-21 23:07:35 +02:00
parent 44c21b7f31
commit 7de2e45f55

View File

@ -833,6 +833,7 @@ class Document:
last_by_depth.append(children)
outlines, count = create_bookmarks(root, pdf)
if outlines:
pdf.catalog['Outlines'] = pydyf.Dictionary({
'Count': count,
'First': outlines[0].reference,