diff --git a/pyqtgraph/__init__.py b/pyqtgraph/__init__.py index 24653207..412c8627 100644 --- a/pyqtgraph/__init__.py +++ b/pyqtgraph/__init__.py @@ -320,7 +320,7 @@ def cleanup(): 'are properly called before app shutdown (%s)\n' % (o,)) s.addItem(o) - except RuntimeError: ## occurs if a python wrapper no longer has its underlying C++ object + except (RuntimeError, ReferenceError): ## occurs if a python wrapper no longer has its underlying C++ object continue _cleanupCalled = True