mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-01-09 14:04:35 +08:00
fixes NullToken for a font (#284)
font was in a streamObject, PdfTokenScanner.ParseObjectStream would return a NullToken DirectObjectFinder.Get would then throw on line 79, even thus it should handle null tokens (i.e. ResourceStore.LoadFontDictionary line 152)
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
public static T Get<T>(IndirectReference reference, IPdfTokenScanner scanner) where T : class, IToken
|
||||
{
|
||||
var temp = scanner.Get(reference);
|
||||
if (temp is null)
|
||||
if (temp is null || temp.Data is NullToken)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user