diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py index f209e811f18b..9e9795e134fe 100644 --- a/lib/matplotlib/backends/backend_ps.py +++ b/lib/matplotlib/backends/backend_ps.py @@ -665,8 +665,9 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): curr_stream[1].append( (item.x, item.ft_object.get_glyph_name(item.glyph_idx)) ) - # append the last entry - stream.append(curr_stream) + if curr_stream is not None: + # append the last entry + stream.append(curr_stream) self.set_color(*gc.get_rgb())