From e2b01ccf749ef8a46e2f5a3185ca9007587501b9 Mon Sep 17 00:00:00 2001 From: 2xB <31772910+2xB@users.noreply.github.com> Date: Fri, 24 May 2019 06:35:01 +0200 Subject: [PATCH] FIX: Correct deletion of matplotlib exporter window object (#868) E.g. when opening the Matplotlib exporter multiple times, and one closes one instance, Python crashes. This is caused by the Matplotlib QMainWindow listening to the closeEvent and deleting the only reference of the window before it is closed properly. --- pyqtgraph/exporters/Matplotlib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyqtgraph/exporters/Matplotlib.py b/pyqtgraph/exporters/Matplotlib.py index 2da979b1..dedc2b87 100644 --- a/pyqtgraph/exporters/Matplotlib.py +++ b/pyqtgraph/exporters/Matplotlib.py @@ -124,5 +124,4 @@ class MatplotlibWindow(QtGui.QMainWindow): def closeEvent(self, ev): MatplotlibExporter.windows.remove(self) - - + self.deleteLater()