diff --git a/lib/matplotlib/backends/backend_pdf.py b/lib/matplotlib/backends/backend_pdf.py index da970286e0cb..085c0e7ec665 100644 --- a/lib/matplotlib/backends/backend_pdf.py +++ b/lib/matplotlib/backends/backend_pdf.py @@ -2273,7 +2273,10 @@ def delta(self, other): ours = getattr(self, p) theirs = getattr(other, p) try: - different = bool(ours != theirs) + if (ours is None or theirs is None): + different = bool(not(ours is theirs)) + else: + different = bool(ours != theirs) except ValueError: ours = np.asarray(ours) theirs = np.asarray(theirs)