Fix outline null object check (#367)

This commit is contained in:
Adrian-George Bostan 2020-06-05 14:46:55 +03:00 committed by GitHub
parent 5777ee1394
commit 6b8d5c42f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,7 @@ func (r *PdfReader) loadOutlines() (*PdfOutlineTreeNode, error) {
outlineRootObj := core.ResolveReference(outlinesObj)
common.Log.Trace("Outline root: %v", outlineRootObj)
if _, isNull := outlineRootObj.(*core.PdfObjectNull); isNull {
if isNull := core.IsNullObject(outlineRootObj); isNull {
common.Log.Trace("Outline root is null - no outlines")
return nil, nil
}