Skip to content

Commit

Permalink
check for edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
gmischler committed Feb 28, 2023
1 parent 22537ef commit 7f307c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fpdf/line_break.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def trim_trailing_spaces(self):
last_frag.trim(-1)
if not last_frag.characters:
del self.fragments[-1]
if not self.fragments:
return
last_frag = self.fragments[-1]
last_char = last_frag.characters[-1]

Expand Down

0 comments on commit 7f307c3

Please sign in to comment.