Fix a traceback on the ship browser
Clicking in empty space produced a traceback. no more!
This commit is contained in:
@@ -40,7 +40,7 @@ class PFListPane(wx.ScrolledWindow):
|
||||
self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self.ForceFocus)
|
||||
|
||||
def ForceFocus(self,event):
|
||||
if self.FindFocus().Parent != self:
|
||||
if self.FindFocus() and self.FindFocus().Parent != self:
|
||||
self.SetFocus()
|
||||
event.Skip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user