Skip to content

Commit

Permalink
skip completely null dictionaries #300
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotJones committed Feb 24, 2021
1 parent cc81541 commit 89ee5f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/UglyToad.PdfPig/Parser/DocumentInformationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public static DocumentInformation Create(IPdfTokenScanner pdfTokenScanner, Trail

private static string GetEntryOrDefault(DictionaryToken infoDictionary, NameToken key)
{
if (infoDictionary == null)
{
return null;
}

if (!infoDictionary.TryGet(key, out var value))
{
return null;
Expand Down

0 comments on commit 89ee5f5

Please sign in to comment.