Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions itext/itext.forms/itext/forms/PdfAcroForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,9 @@ private IDictionary<String, PdfFormField> IterateFields(PdfArray array, IDiction
String name;
if (fieldName == null) {
PdfFormField parentField = PdfFormField.MakeFormField(formField.GetParent(), document);
if (parentField == null){
continue;
}
while (fieldName == null) {
fieldName = parentField.GetFieldName();
if (fieldName == null) {
Expand Down
2 changes: 1 addition & 1 deletion itext/itext.forms/itext/forms/fields/PdfFormField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ public static PdfChoiceFormField CreateList(PdfDocument doc, Rectangle rect, Str
/// <c>pdfObject</c> does not contain a <c>FT</c> entry
/// </returns>
public static iText.Forms.Fields.PdfFormField MakeFormField(PdfObject pdfObject, PdfDocument document) {
if (pdfObject.IsDictionary()) {
if (pdfObject != null && pdfObject.IsDictionary()) {
iText.Forms.Fields.PdfFormField field;
PdfDictionary dictionary = (PdfDictionary)pdfObject;
PdfName formType = dictionary.GetAsName(PdfName.FT);
Expand Down