AuiToolBar checks that it has not been Destroyed by the most recent action before doing any post-processing for the action

This commit is contained in:
Jorge Moraleda
2020-11-25 19:54:11 -08:00
parent 6959fd7f98
commit e059ec1af9

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()