| 1 | diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py |
| 2 | --- a/lib/matplotlib/backends/backend_ps.py |
| 3 | +++ b/lib/matplotlib/backends/backend_ps.py |
| 4 | @@ -665,8 +665,9 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): |
| 5 | curr_stream[1].append( |
| 6 | (item.x, item.ft_object.get_glyph_name(item.glyph_idx)) |
| 7 | ) |
| 8 | - # append the last entry |
| 9 | - stream.append(curr_stream) |
| 10 | + # append the last entry if exists |
| 11 | + if curr_stream: |
| 12 | + stream.append(curr_stream) |
| 13 | |
| 14 | self.set_color(*gc.get_rgb()) |
| 15 | |