Fix a traceback on the ship browser

Clicking in empty space produced a traceback. no more!
This commit is contained in:
Corollax
2010-12-26 15:30:11 -06:00
parent 99dbcf955e
commit 11e51a0bd2

View File

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