Skip to content

Commit 6e389df

Browse files
committed
Return null if obj is of type PdfNull
fixes ststeiger#287
1 parent 2828a90 commit 6e389df

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)