Merge pull request #1909 from NilsNemitz/None-check_AxisItem_label
None-check AxisItem.label before access
This commit is contained in:
commit
4e293dd17d
@ -233,6 +233,10 @@ class AxisItem(GraphicsWidget):
|
||||
|
||||
## Set the position of the label
|
||||
nudge = 5
|
||||
if self.label is None: # self.label is set to None on close, but resize events can still occur.
|
||||
self.picture = None
|
||||
return
|
||||
|
||||
br = self.label.boundingRect()
|
||||
p = QtCore.QPointF(0, 0)
|
||||
if self.orientation == 'left':
|
||||
|
Loading…
Reference in New Issue
Block a user