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:
Robin Dunn
2006-05-04 02:18:25 +00:00
parent 7f80dd64ec
commit 4e20fcc551

View File

@@ -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):