Fixed a traceback in characterEditor caused when trying to add an implant while implants/booster tree has no item selected

This commit is contained in:
HomeWorld
2010-12-08 16:47:10 +02:00
parent a73497a8d1
commit 6a7d43cb84

View File

@@ -492,6 +492,10 @@ class ImplantsTreeView (wx.Panel):
def addImplant(self, event):
root = self.availableImplantsTree.GetSelection()
if not root.IsOk():
return
nchilds = self.availableImplantsTree.GetChildrenCount(root)
cChar = service.Character.getInstance()
charID = self.Parent.Parent.getActiveCharacter()