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:
Romain V
2021-02-08 16:19:39 +01:00
committed by GitHub
parent 6f49b2e29e
commit c008340b2b

View File

@@ -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;
}