From e059ec1af99d1ad5907b1640971f6b438d9d5244 Mon Sep 17 00:00:00 2001 From: Jorge Moraleda Date: Wed, 25 Nov 2020 19:54:11 -0800 Subject: [PATCH] AuiToolBar checks that it has not been Destroyed by the most recent action before doing any post-processing for the action --- wx/lib/agw/aui/auibar.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wx/lib/agw/aui/auibar.py b/wx/lib/agw/aui/auibar.py index 6fa51051..39b92982 100644 --- a/wx/lib/agw/aui/auibar.py +++ b/wx/lib/agw/aui/auibar.py @@ -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() -