Workaround to avoid problem possibly due to Unbind() not working.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-04-10 00:05:50 +00:00
parent b85f0fd8e6
commit f8e549f767

View File

@@ -265,14 +265,16 @@ class InspectionFrame(wx.Frame):
def OnClose(self, evt):
self.SaveSettings(self.config)
evt.Skip()
if not self:
return
self.SaveSettings(self.config)
if hasattr(self, 'mgr'):
self.mgr.UnInit()
del self.mgr
if self.Parent:
tlw = self.Parent.GetTopLevelParent()
tlw.Unbind(wx.EVT_CLOSE, handler=self.OnClose)
if self.Parent:
tlw = self.Parent.GetTopLevelParent()
tlw.Unbind(wx.EVT_CLOSE, handler=self.OnClose)
def UpdateInfo(self):