Merge pull request #1857 from jmoraleda/Issue1856

AuiToolBar checks that it has not been Destroyed by the most recent a…
This commit is contained in:
Robin Dunn
2020-12-18 16:29:58 -08:00
committed by GitHub

View File

@@ -3257,6 +3257,9 @@ class AuiToolBar(wx.Control):
def DoIdleUpdate(self):
""" Updates the toolbar during idle times. """
if not self:
return # The action Destroyed the toolbar!
handler = self.GetEventHandler()
if not handler:
return
@@ -4028,4 +4031,3 @@ class AuiToolBar(wx.Control):
manager = self.GetAuiManager()
manager.StopPreviewTimer()