Ensure the button still exists after the Notify before doing anything
with it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -312,8 +312,9 @@ class GenButton(wx.PyControl):
|
||||
if not self.up: # if the button was down when the mouse was released...
|
||||
self.Notify()
|
||||
self.up = True
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
if self: # in case the button was destroyed in the eventhandler
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
|
||||
def OnMotion(self, event):
|
||||
|
Reference in New Issue
Block a user