Skip to content

Commit ad86921

Browse files
authored
Merge pull request ststeiger#288 from dampee/287-pdfnull-integer-value
Return null if obj is of type PdfNull
2 parents 2f222e1 + 6e389df commit ad86921

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PdfSharpCore/Pdf/PdfDictionary.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,10 @@ public int GetInteger(string key, bool create)
395395
this[key] = new PdfInteger();
396396
return 0;
397397
}
398+
399+
if (obj is PdfNull)
400+
return 0;
401+
398402
PdfReference reference = obj as PdfReference;
399403
if (reference != null)
400404
obj = reference.Value;

0 commit comments

Comments
 (0)