From e7b11cb39a8a096f34a1cfb9b520a5365c5fe6d0 Mon Sep 17 00:00:00 2001 From: Mitchel Paulin Date: Wed, 14 Oct 2020 13:07:12 -0400 Subject: [PATCH] Fixed bug where removeTempArea would be called on home even if it was not defined (#1349) * Fixed bug where removeTempArea would be called on home even if it was not defined * Made the check for whether or not home is defined more explicit --- pyqtgraph/dockarea/DockArea.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/dockarea/DockArea.py b/pyqtgraph/dockarea/DockArea.py index ff3f22ab..93841e0a 100644 --- a/pyqtgraph/dockarea/DockArea.py +++ b/pyqtgraph/dockarea/DockArea.py @@ -319,7 +319,7 @@ class DockArea(Container, QtGui.QWidget, DockDrop): #print "apoptose area:", self.temporary, self.topContainer, self.topContainer.count() if self.topContainer is None or self.topContainer.count() == 0: self.topContainer = None - if self.temporary: + if self.temporary and self.home is not None: self.home.removeTempArea(self) #self.close()