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:
parent
44c21b7f31
commit
7de2e45f55
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user