mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-04 22:17:22 +08:00
Add type check for Size in trailer. Fixes #77
This commit is contained in:
parent
5f506b7427
commit
1769c68234
@ -804,8 +804,8 @@ func (this *PdfParser) parseXrefStream(xstm *PdfObjectInteger) (*PdfObjectDictio
|
||||
|
||||
trailerDict := xs.PdfObjectDictionary
|
||||
|
||||
sizeObj := xs.PdfObjectDictionary.Get("Size").(*PdfObjectInteger)
|
||||
if sizeObj == nil {
|
||||
sizeObj, ok := xs.PdfObjectDictionary.Get("Size").(*PdfObjectInteger)
|
||||
if !ok {
|
||||
common.Log.Debug("ERROR: Missing size from xref stm")
|
||||
return nil, errors.New("Missing Size from xref stm")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user