mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-26 13:48:55 +08:00
Skip loading outlines on invalid outline root node (#84)
This commit is contained in:
parent
c3a24925ff
commit
4290e33c36
@ -283,7 +283,8 @@ func (r *PdfReader) loadOutlines() (*PdfOutlineTreeNode, error) {
|
|||||||
outlineRoot, ok := outlineRootObj.(*core.PdfIndirectObject)
|
outlineRoot, ok := outlineRootObj.(*core.PdfIndirectObject)
|
||||||
if !ok {
|
if !ok {
|
||||||
if _, ok := core.GetDict(outlineRootObj); !ok {
|
if _, ok := core.GetDict(outlineRootObj); !ok {
|
||||||
return nil, errors.New("outline root should be an indirect object")
|
common.Log.Debug("Invalid outline root - skipping")
|
||||||
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
common.Log.Debug("Outline root is a dict. Should be an indirect object")
|
common.Log.Debug("Outline root is a dict. Should be an indirect object")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user