Skip to content

Commit

Permalink
Eliminate error source
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Apr 26, 2022
1 parent abd58e8 commit 7ca0cd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PyPDF2/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,8 @@ def getFormTextFields(self):
'''
# Retrieve document form fields
formfields = self.getFields()
if formfields is None:
return {}
return {
formfields[field]['/T']: formfields[field].get('/V') for field in formfields \
if formfields[field].get('/FT') == '/Tx'
Expand Down

0 comments on commit 7ca0cd8

Please sign in to comment.